${function() {
const variantData = data.variant || {"id":"cbcc8175-0fa5-4b7e-8866-ebe71b9048c0","product_id":"38ad5673-a950-442e-9140-6f799b516418","title":"Deep blue-M","weight_unit":"kg","inventory_quantity":1000,"sku":"Deep blue-M--4582789087720","barcode":"","position":6,"option1":"Deep blue","option2":"M","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/1bd412a7ea1f961c4898d3b3603c3e52.jpeg","path":"1bd412a7ea1f961c4898d3b3603c3e52.jpeg","width":800,"height":800,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":45,"min_quantity":1}],"weight":"0","compare_at_price":"88","price":"45","retail_price":"88","available":true,"url":"\/products\/607562154877?variant=cbcc8175-0fa5-4b7e-8866-ebe71b9048c0","available_quantity":999999999,"options":[{"name":"Color","value":"Deep blue"},{"name":"Size","value":"M"}],"off_ratio":49,"flashsale_info":[],"sales":4};
const saveType = "amount";
const saveText = "Save {{saved_amount}}";
const productLabelDiscountOn = true;
return `
-
${saveText.replace('\{\{saved_amount\}\}',
saveType == 'percentage'
? variantData.off_ratio + '%'
: ``
)}
`;
}()}
${function(){
const tipText = "Please select a {{ name }}".replace(/\{\{\s+name\s+\}\}/g, data);
return `${tipText}
`
}()}
${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 postageFreeAmount = 79;
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 `
`;
}()}