people are viewing this right now
${function() {
const variantData = data.variant || {"id":"19adb2de-3745-4749-bef9-9f99b6e9bfd5","product_id":"86530f53-8b32-423b-aa75-102d676a1a39","title":"01-S \uff08US\uff09","weight_unit":"kg","inventory_quantity":1000,"sku":"LF10235003C05S","barcode":"","position":1,"option1":"01","option2":"S \uff08US\uff09","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/6b304811c59809f5fb69b76ce16fc774.jpeg","path":"6b304811c59809f5fb69b76ce16fc774.jpeg","width":800,"height":800,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":49.99,"min_quantity":1}],"weight":"0","compare_at_price":"39.99","price":"49.99","retail_price":"39.99","available":true,"url":"\/products\/boho-maxi-dresses?variant=19adb2de-3745-4749-bef9-9f99b6e9bfd5","available_quantity":999999999,"options":[{"name":"Style","value":"01"},{"name":"Size","value":"S \uff08US\uff09"}],"off_ratio":0,"flashsale_info":[],"sales":0};
const saveType = "amount";
const saveText = "Save {{saved_amount}}";
const productLabelDiscountOn = true;
return `
-
${saveText.replace('\{\{saved_amount\}\}',
saveType == 'percentage'
? variantData.off_ratio + '%'
: ` `
)}
`;
}()}
Style
: 01
${function(){
const optName = "Style";
const optionValue = data.originData.selectData ? data.originData.selectData[optName].value : data.originData.value;
const optionValueText = optionValue ? (': ' + optionValue) : '';
return `
${optionValueText}
`
}()}
${function(){
const tipText = "Please select a {{ name }}".replace(/\{\{\s+name\s+\}\}/g, data);
return `${tipText}
`
}()}
Size
: S (US)
${function(){
const optName = "Size";
const optionValue = data.originData.selectData ? data.originData.selectData[optName].value : data.originData.value;
const optionValueText = optionValue ? (': ' + optionValue) : '';
return `
${optionValueText}
`
}()}
${function(){
const tipText = "Please select a {{ name }}".replace(/\{\{\s+name\s+\}\}/g, data);
return `${tipText}
`
}()}
${function() {
const minInventory = parseInt('10');
const maxInventory = parseInt('50');
const randomInventory = Math.round(Math.random() * (maxInventory - minInventory)) + minInventory;
const customText = "Only {stock} item(s) left in stock!".replace(/\{stock\}/g, '' + randomInventory + ' ');
const barWidth = (randomInventory / maxInventory) * 100 + '%';
return `
`;
}()}
Add to cart
$49.99
${function(){
const wholesale_enabled = false;
const qty = data.quantity || 1;
const currentSelectVariant = data.variant;
const defaultVariant = (data.product && data.product.variants && data.product.variants[0]);
const productVariant = {"id":"19adb2de-3745-4749-bef9-9f99b6e9bfd5","product_id":"86530f53-8b32-423b-aa75-102d676a1a39","title":"01-S \uff08US\uff09","weight_unit":"kg","inventory_quantity":1000,"sku":"LF10235003C05S","barcode":"","position":1,"option1":"01","option2":"S \uff08US\uff09","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/6b304811c59809f5fb69b76ce16fc774.jpeg","path":"6b304811c59809f5fb69b76ce16fc774.jpeg","width":800,"height":800,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":49.99,"min_quantity":1}],"weight":"0","compare_at_price":"39.99","price":"49.99","retail_price":"39.99","available":true,"url":"\/products\/boho-maxi-dresses?variant=19adb2de-3745-4749-bef9-9f99b6e9bfd5","available_quantity":999999999,"options":[{"name":"Style","value":"01"},{"name":"Size","value":"S \uff08US\uff09"}],"off_ratio":0,"flashsale_info":[],"sales":0};
const variantData = currentSelectVariant || defaultVariant || productVariant;
const wholesale_price = variantData.wholesale_price || [];
if(wholesale_enabled && wholesale_price.length > 0) {
let wholesaleIndex = wholesale_price.findIndex(item => {
return item.min_quantity > qty;
});
if(wholesaleIndex < 0){
wholesaleIndex = wholesale_price.length - 1;
}else if(wholesaleIndex > 0){
wholesaleIndex = wholesaleIndex - 1;
}
const wholesalePrice = wholesale_price[wholesaleIndex] || '';
return `
`
}else {
const price = variantData && variantData.price;
return price != undefined ? `
` : ' ';
}
}()}
Buy now
Product was out of stock.
Product is unavailable.
${function(){
const variantData = data.variant || {"id":"19adb2de-3745-4749-bef9-9f99b6e9bfd5","product_id":"86530f53-8b32-423b-aa75-102d676a1a39","title":"01-S \uff08US\uff09","weight_unit":"kg","inventory_quantity":1000,"sku":"LF10235003C05S","barcode":"","position":1,"option1":"01","option2":"S \uff08US\uff09","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/6b304811c59809f5fb69b76ce16fc774.jpeg","path":"6b304811c59809f5fb69b76ce16fc774.jpeg","width":800,"height":800,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":49.99,"min_quantity":1}],"weight":"0","compare_at_price":"39.99","price":"49.99","retail_price":"39.99","available":true,"url":"\/products\/boho-maxi-dresses?variant=19adb2de-3745-4749-bef9-9f99b6e9bfd5","available_quantity":999999999,"options":[{"name":"Style","value":"01"},{"name":"Size","value":"S \uff08US\uff09"}],"off_ratio":0,"flashsale_info":[],"sales":0};
return `
`
}()}