${function() {
const variantData = data.variant || {"id":"921590c9-e1b0-4ddd-8b1a-8d128ff9def2","product_id":"2de7ef67-ebab-4450-8d76-0fcc1d00fa99","title":"0.00\uff08PLANO\uff09","weight_unit":"kg","inventory_quantity":331,"sku":"CZ002D03402Y-000","barcode":"","position":1,"option1":"0.00\uff08PLANO\uff09","option2":"","option3":"","note":"","image":null,"wholesale_price":[{"price":35,"min_quantity":1}],"weight":"0.04","compare_at_price":"35","price":"35","retail_price":"35","available":true,"url":"\/products\/sunrise-dawn-city-beijing-6-months-2-pcs?variant=921590c9-e1b0-4ddd-8b1a-8d128ff9def2","available_quantity":331,"options":[{"name":"diopter","value":"0.00\uff08PLANO\uff09"}],"off_ratio":0,"flashsale_info":[],"sales":25};
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":"921590c9-e1b0-4ddd-8b1a-8d128ff9def2","product_id":"2de7ef67-ebab-4450-8d76-0fcc1d00fa99","title":"0.00\uff08PLANO\uff09","weight_unit":"kg","inventory_quantity":331,"sku":"CZ002D03402Y-000","barcode":"","position":1,"option1":"0.00\uff08PLANO\uff09","option2":"","option3":"","note":"","image":null,"wholesale_price":[{"price":35,"min_quantity":1}],"weight":"0.04","compare_at_price":"35","price":"35","retail_price":"35","available":true,"url":"\/products\/sunrise-dawn-city-beijing-6-months-2-pcs?variant=921590c9-e1b0-4ddd-8b1a-8d128ff9def2","available_quantity":331,"options":[{"name":"diopter","value":"0.00\uff08PLANO\uff09"}],"off_ratio":0,"flashsale_info":[],"sales":25};
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 `
`;
}()}