${function() {
const variantData = data.variant || {"id":"60b3e460-f41c-4e42-8c4e-35e45869b893","product_id":"e113b8ae-37d0-4e5e-a758-9c7fd808ba2d","title":"Daily-0.00","weight_unit":"kg","inventory_quantity":1717,"sku":"CZ003D16610D-000","barcode":"","position":1,"option1":"Daily","option2":"0.00","option3":"","note":"","image":null,"wholesale_price":[{"price":25,"min_quantity":1}],"weight":"0","compare_at_price":"25","price":"25","retail_price":"25","available":true,"url":"\/products\/pearl-girl-highlight-moment-daily-monthly-half-yearly?variant=60b3e460-f41c-4e42-8c4e-35e45869b893","available_quantity":1717,"options":[{"name":"Duration","value":"Daily"},{"name":"Diopter","value":"0.00"}],"off_ratio":0,"flashsale_info":[],"sales":29};
const saveType = "amount";
const saveText = "Save {{saved_amount}}";
const productLabelDiscountOn = false;
return `
-
${saveText.replace('\{\{saved_amount\}\}',
saveType == 'percentage'
? variantData.off_ratio + '%'
: ``
)}
`;
}()}
Duration
${function(){
const tipText = "Please select a {{ name }}".replace(/\{\{\s+name\s+\}\}/g, data);
return `${tipText}
`
}()}
Diopter
${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 variantData = data.variant || {"id":"60b3e460-f41c-4e42-8c4e-35e45869b893","product_id":"e113b8ae-37d0-4e5e-a758-9c7fd808ba2d","title":"Daily-0.00","weight_unit":"kg","inventory_quantity":1717,"sku":"CZ003D16610D-000","barcode":"","position":1,"option1":"Daily","option2":"0.00","option3":"","note":"","image":null,"wholesale_price":[{"price":25,"min_quantity":1}],"weight":"0","compare_at_price":"25","price":"25","retail_price":"25","available":true,"url":"\/products\/pearl-girl-highlight-moment-daily-monthly-half-yearly?variant=60b3e460-f41c-4e42-8c4e-35e45869b893","available_quantity":1717,"options":[{"name":"Duration","value":"Daily"},{"name":"Diopter","value":"0.00"}],"off_ratio":0,"flashsale_info":[],"sales":29};
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 `
`;
}()}