${function() {
const variantData = data.variant || {"id":"39caa1d4-8f71-44bc-861d-b3d24f935389","product_id":"e5c5f15f-1fac-492b-acf6-66e22f0c7daa","title":"Choker","weight_unit":"kg","inventory_quantity":995,"sku":"BK5039-Green-Choker","barcode":"","position":1,"option1":"Choker","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/8cc102b0079e65070acd4d4d53a1b454.jpeg","path":"8cc102b0079e65070acd4d4d53a1b454.jpeg","width":998,"height":999,"alt":"","aspect_ratio":0.998998998998999},"wholesale_price":[{"price":17.99,"min_quantity":1}],"weight":"0.5","compare_at_price":"0","price":"17.99","retail_price":"0","available":true,"url":"\/products\/scribe-elastic-choker-belt?variant=39caa1d4-8f71-44bc-861d-b3d24f935389","available_quantity":995,"options":[{"name":"Style","value":"Choker"}],"off_ratio":0,"flashsale_info":[],"sales":0};
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}
`
}()}
Product was out of stock.
Product is unavailable.
${function(){
const variantData = data.variant || {"id":"39caa1d4-8f71-44bc-861d-b3d24f935389","product_id":"e5c5f15f-1fac-492b-acf6-66e22f0c7daa","title":"Choker","weight_unit":"kg","inventory_quantity":995,"sku":"BK5039-Green-Choker","barcode":"","position":1,"option1":"Choker","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/8cc102b0079e65070acd4d4d53a1b454.jpeg","path":"8cc102b0079e65070acd4d4d53a1b454.jpeg","width":998,"height":999,"alt":"","aspect_ratio":0.998998998998999},"wholesale_price":[{"price":17.99,"min_quantity":1}],"weight":"0.5","compare_at_price":"0","price":"17.99","retail_price":"0","available":true,"url":"\/products\/scribe-elastic-choker-belt?variant=39caa1d4-8f71-44bc-861d-b3d24f935389","available_quantity":995,"options":[{"name":"Style","value":"Choker"}],"off_ratio":0,"flashsale_info":[],"sales":0};
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 `
`;
}()}