${function() {
const variantData = data.variant || {"id":"8e4d23ca-f849-4007-8052-786cb6b23e40","product_id":"02d05d5f-721b-4207-bfa9-1e54672219d3","title":"#10-Kids","weight_unit":"kg","inventory_quantity":1000,"sku":"DF1132-#10-Kids","barcode":"","position":2,"option1":"#10","option2":"Kids","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/98e59a3b3fcaf55c7b3d1fd22fdc6579.jpg","path":"98e59a3b3fcaf55c7b3d1fd22fdc6579.jpg","width":800,"height":800,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":29.99,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"29.99","retail_price":"0","available":true,"url":"\/products\/step-away-christmas-ski-mask-wcgu?variant=8e4d23ca-f849-4007-8052-786cb6b23e40","available_quantity":1000,"options":[{"name":"Style","value":"#10"},{"name":"Size","value":"Kids"}],"off_ratio":0,"flashsale_info":[],"sales":3};
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":"8e4d23ca-f849-4007-8052-786cb6b23e40","product_id":"02d05d5f-721b-4207-bfa9-1e54672219d3","title":"#10-Kids","weight_unit":"kg","inventory_quantity":1000,"sku":"DF1132-#10-Kids","barcode":"","position":2,"option1":"#10","option2":"Kids","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/98e59a3b3fcaf55c7b3d1fd22fdc6579.jpg","path":"98e59a3b3fcaf55c7b3d1fd22fdc6579.jpg","width":800,"height":800,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":29.99,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"29.99","retail_price":"0","available":true,"url":"\/products\/step-away-christmas-ski-mask-wcgu?variant=8e4d23ca-f849-4007-8052-786cb6b23e40","available_quantity":1000,"options":[{"name":"Style","value":"#10"},{"name":"Size","value":"Kids"}],"off_ratio":0,"flashsale_info":[],"sales":3};
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 `
`;
}()}