${function() {
const variantData = data.variant || {"id":"218f3b84-cd26-4dce-ad82-5f1e64d68f63","product_id":"bf90a5f1-5bd8-42ad-a835-90c5ea9e7655","title":"#1-Onesize","weight_unit":"kg","inventory_quantity":968,"sku":"DF1116-#1-Onesize","barcode":"","position":1,"option1":"#1","option2":"Onesize","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/0e5ebb90ff61d175068ccd682fef1d1d.jpeg","path":"0e5ebb90ff61d175068ccd682fef1d1d.jpeg","width":800,"height":800,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":34.99,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"34.99","retail_price":"0","available":true,"url":"\/products\/i-mean-us-devil-ski-mask-hat?variant=218f3b84-cd26-4dce-ad82-5f1e64d68f63","available_quantity":968,"options":[{"name":"Style","value":"#1"},{"name":"Size","value":"Onesize"}],"off_ratio":0,"flashsale_info":[],"sales":144};
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 variantData = data.variant || {"id":"218f3b84-cd26-4dce-ad82-5f1e64d68f63","product_id":"bf90a5f1-5bd8-42ad-a835-90c5ea9e7655","title":"#1-Onesize","weight_unit":"kg","inventory_quantity":968,"sku":"DF1116-#1-Onesize","barcode":"","position":1,"option1":"#1","option2":"Onesize","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/0e5ebb90ff61d175068ccd682fef1d1d.jpeg","path":"0e5ebb90ff61d175068ccd682fef1d1d.jpeg","width":800,"height":800,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":34.99,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"34.99","retail_price":"0","available":true,"url":"\/products\/i-mean-us-devil-ski-mask-hat?variant=218f3b84-cd26-4dce-ad82-5f1e64d68f63","available_quantity":968,"options":[{"name":"Style","value":"#1"},{"name":"Size","value":"Onesize"}],"off_ratio":0,"flashsale_info":[],"sales":144};
return `
`
}()}
${function() {
const postageFreeAmount = 100;
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 `
`;
}()}