${function() {
const variantData = data.variant || {"id":"be363d0a-2a3d-4fe7-8f9d-f98f0f26c323","product_id":"9f8da191-7461-4767-a1d9-c7a5f0528c93","title":"Pink-XL","weight_unit":"kg","inventory_quantity":1000,"sku":"PH1-220314-43-Pink-XL","barcode":"","position":1,"option1":"Pink","option2":"XL","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/11aa1d5fd7fd7ec6751b931e38b687cc.jpeg","path":"11aa1d5fd7fd7ec6751b931e38b687cc.jpeg","width":450,"height":600,"alt":"","aspect_ratio":0.75},"wholesale_price":[{"price":12.99,"min_quantity":1}],"weight":"0","compare_at_price":"25","price":"12.99","retail_price":"25","available":true,"url":"\/products\/cotton-sleeveless-casual-simple-vest?variant=be363d0a-2a3d-4fe7-8f9d-f98f0f26c323","available_quantity":999999999,"options":[{"name":"Color","value":"Pink"},{"name":"Size","value":"XL"}],"off_ratio":48,"flashsale_info":[],"sales":19};
const saveType = "amount";
const saveText = "Save {{saved_amount}}";
const productLabelDiscountOn = true;
return `
-
${saveText.replace('\{\{saved_amount\}\}',
saveType == 'percentage'
? variantData.off_ratio + '%'
: ``
)}
`;
}()}
${function(){
const tipText = "Please select a {{ name }}".replace(/\{\{\s+name\s+\}\}/g, data);
return `${tipText}
`
}()}
${function(){
const tipText = "Please select a {{ name }}".replace(/\{\{\s+name\s+\}\}/g, data);
return `${tipText}
`
}()}
Product was out of stock.
Product is unavailable.
${function() {
const postageFreeAmount = 79;
const custom_text = "Buy {amount} more to enjoy FREE Shipping";
const totalPrice = +data.total_price;
const diffPrice = postageFreeAmount - totalPrice;
const percentDiff = (diffPrice > 0 ? (totalPrice / postageFreeAmount * 100) : 100) + '%';
let tipText = "Your order is free delivery";
if (diffPrice > 0) {
tipText = custom_text.replace('{amount}', `
`);
}
return `
`;
}()}