${function() {
const variantData = data.variant || {"id":"076dd3e1-e08b-4cc2-adb7-0515ee4f3bf5","product_id":"c235b2f8-0d2f-4aaf-b2d2-8b7abf3c211e","title":"White-M","weight_unit":"kg","inventory_quantity":1000,"sku":"LSN-White-M-A00439672","barcode":"","position":1,"option1":"White","option2":"M","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/fee86149421706c4f51b6235e91e1712.jpeg","path":"fee86149421706c4f51b6235e91e1712.jpeg","width":600,"height":750,"alt":"","aspect_ratio":0.8},"wholesale_price":[{"price":20.99,"min_quantity":1}],"weight":"0","compare_at_price":"29.98","price":"20.99","retail_price":"29.98","available":true,"url":"\/products\/comfortable-linen-camisole-top-204151824144?variant=076dd3e1-e08b-4cc2-adb7-0515ee4f3bf5","available_quantity":999999999,"options":[{"name":"Color","value":"White"},{"name":"Size","value":"M"}],"off_ratio":30,"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 + '%'
: ` `
)}
`;
}()}
Color
: White
${function(){
const optName = "Color";
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
: M
${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}
`
}()}
Add to cart
$20.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":"076dd3e1-e08b-4cc2-adb7-0515ee4f3bf5","product_id":"c235b2f8-0d2f-4aaf-b2d2-8b7abf3c211e","title":"White-M","weight_unit":"kg","inventory_quantity":1000,"sku":"LSN-White-M-A00439672","barcode":"","position":1,"option1":"White","option2":"M","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/fee86149421706c4f51b6235e91e1712.jpeg","path":"fee86149421706c4f51b6235e91e1712.jpeg","width":600,"height":750,"alt":"","aspect_ratio":0.8},"wholesale_price":[{"price":20.99,"min_quantity":1}],"weight":"0","compare_at_price":"29.98","price":"20.99","retail_price":"29.98","available":true,"url":"\/products\/comfortable-linen-camisole-top-204151824144?variant=076dd3e1-e08b-4cc2-adb7-0515ee4f3bf5","available_quantity":999999999,"options":[{"name":"Color","value":"White"},{"name":"Size","value":"M"}],"off_ratio":30,"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":"076dd3e1-e08b-4cc2-adb7-0515ee4f3bf5","product_id":"c235b2f8-0d2f-4aaf-b2d2-8b7abf3c211e","title":"White-M","weight_unit":"kg","inventory_quantity":1000,"sku":"LSN-White-M-A00439672","barcode":"","position":1,"option1":"White","option2":"M","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/fee86149421706c4f51b6235e91e1712.jpeg","path":"fee86149421706c4f51b6235e91e1712.jpeg","width":600,"height":750,"alt":"","aspect_ratio":0.8},"wholesale_price":[{"price":20.99,"min_quantity":1}],"weight":"0","compare_at_price":"29.98","price":"20.99","retail_price":"29.98","available":true,"url":"\/products\/comfortable-linen-camisole-top-204151824144?variant=076dd3e1-e08b-4cc2-adb7-0515ee4f3bf5","available_quantity":999999999,"options":[{"name":"Color","value":"White"},{"name":"Size","value":"M"}],"off_ratio":30,"flashsale_info":[],"sales":0};
return `
`
}()}