${function() {
const variantData = data.variant || {"id":"aeee616a-e727-4b26-acb5-6f8578197be5","product_id":"05cc73db-2b0c-4277-8480-94d9ec14978b","title":"","weight_unit":"kg","inventory_quantity":100,"sku":"ZP000239","barcode":"","position":1,"option1":"","option2":"","option3":"","note":"","image":null,"wholesale_price":[{"price":5.99,"min_quantity":1}],"weight":"0.01","compare_at_price":"9.99","price":"5.99","retail_price":"9.99","available":true,"url":"\/products\/cofancy-skin-friendly-contact-lens-case?variant=aeee616a-e727-4b26-acb5-6f8578197be5","available_quantity":100,"options":[],"off_ratio":40,"flashsale_info":[],"sales":14};
const saveType = "amount";
const saveText = "Save {{saved_amount}}";
const productLabelDiscountOn = false;
return `
-
${saveText.replace('\{\{saved_amount\}\}',
saveType == 'percentage'
? variantData.off_ratio + '%'
: ``
)}
`;
}()}
Product was out of stock.
Product is unavailable.
${function(){
const variantData = data.variant || {"id":"aeee616a-e727-4b26-acb5-6f8578197be5","product_id":"05cc73db-2b0c-4277-8480-94d9ec14978b","title":"","weight_unit":"kg","inventory_quantity":100,"sku":"ZP000239","barcode":"","position":1,"option1":"","option2":"","option3":"","note":"","image":null,"wholesale_price":[{"price":5.99,"min_quantity":1}],"weight":"0.01","compare_at_price":"9.99","price":"5.99","retail_price":"9.99","available":true,"url":"\/products\/cofancy-skin-friendly-contact-lens-case?variant=aeee616a-e727-4b26-acb5-6f8578197be5","available_quantity":100,"options":[],"off_ratio":40,"flashsale_info":[],"sales":14};
return `
`
}()}
${function() {
const postageFreeAmount = 59;
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 `
`;
}()}