${function() {
const variantData = data.variant || {"id":"89f2896c-fdfa-4a9c-9bf6-b25434ca8b95","product_id":"af3fcc7c-497d-4b88-b35f-b0286b0ddd16","title":"-7.50","weight_unit":"kg","inventory_quantity":72,"sku":"2KFGH-H-Y750","barcode":"","position":23,"option1":"-7.50","option2":"","option3":"","note":"","image":null,"wholesale_price":[{"price":31.5,"min_quantity":1}],"weight":"0.04","compare_at_price":"35","price":"31.5","retail_price":"35","available":true,"url":"\/products\/killer-gray-cozy-6-months-2-pcs?variant=89f2896c-fdfa-4a9c-9bf6-b25434ca8b95","available_quantity":72,"options":[{"name":"diopter","value":"-7.50"}],"off_ratio":10,"flashsale_info":[],"sales":0};
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":"89f2896c-fdfa-4a9c-9bf6-b25434ca8b95","product_id":"af3fcc7c-497d-4b88-b35f-b0286b0ddd16","title":"-7.50","weight_unit":"kg","inventory_quantity":72,"sku":"2KFGH-H-Y750","barcode":"","position":23,"option1":"-7.50","option2":"","option3":"","note":"","image":null,"wholesale_price":[{"price":31.5,"min_quantity":1}],"weight":"0.04","compare_at_price":"35","price":"31.5","retail_price":"35","available":true,"url":"\/products\/killer-gray-cozy-6-months-2-pcs?variant=89f2896c-fdfa-4a9c-9bf6-b25434ca8b95","available_quantity":72,"options":[{"name":"diopter","value":"-7.50"}],"off_ratio":10,"flashsale_info":[],"sales":0};
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 `
`;
}()}