${function() {
const variantData = data.variant || {"id":"190ea8c5-1ab2-4eda-b903-3fa28d8d8012","product_id":"5489a4fa-b3cd-4462-be2b-6b6e6f705788","title":"0.00 PLANO","weight_unit":"kg","inventory_quantity":40,"sku":"CZ003B11010D-000","barcode":"","position":1,"option1":"0.00 PLANO","option2":"","option3":"","note":"","image":null,"wholesale_price":[{"price":22.5,"min_quantity":1}],"weight":"0","compare_at_price":"25","price":"22.5","retail_price":"25","available":true,"url":"\/products\/ash-grey-cozy-1-day-10-pcs?variant=190ea8c5-1ab2-4eda-b903-3fa28d8d8012","available_quantity":40,"options":[{"name":"diopter","value":"0.00 PLANO"}],"off_ratio":10,"flashsale_info":[],"sales":10};
const saveType = "amount";
const saveText = "Save {{saved_amount}}";
const productLabelDiscountOn = false;
return `
-
${saveText.replace('\{\{saved_amount\}\}',
saveType == 'percentage'
? variantData.off_ratio + '%'
: ``
)}
`;
}()}
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":"190ea8c5-1ab2-4eda-b903-3fa28d8d8012","product_id":"5489a4fa-b3cd-4462-be2b-6b6e6f705788","title":"0.00 PLANO","weight_unit":"kg","inventory_quantity":40,"sku":"CZ003B11010D-000","barcode":"","position":1,"option1":"0.00 PLANO","option2":"","option3":"","note":"","image":null,"wholesale_price":[{"price":22.5,"min_quantity":1}],"weight":"0","compare_at_price":"25","price":"22.5","retail_price":"25","available":true,"url":"\/products\/ash-grey-cozy-1-day-10-pcs?variant=190ea8c5-1ab2-4eda-b903-3fa28d8d8012","available_quantity":40,"options":[{"name":"diopter","value":"0.00 PLANO"}],"off_ratio":10,"flashsale_info":[],"sales":10};
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 `
`;
}()}