${function() {
const variantData = data.variant || {"id":"a8abbf97-21ae-435e-80b8-e4bddaa44316","product_id":"549325cd-5b08-40a4-8ceb-d792df34625e","title":"Pink","weight_unit":"kg","inventory_quantity":998,"sku":"BK7046-choker-pink","barcode":"","position":3,"option1":"Pink","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/ebe18d708ace164fbaf46d271327f547.jpeg","path":"ebe18d708ace164fbaf46d271327f547.jpeg","width":640,"height":640,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":19.99,"min_quantity":1}],"weight":"0.23","compare_at_price":"0","price":"19.99","retail_price":"0","available":true,"url":"\/products\/choker-amra?variant=a8abbf97-21ae-435e-80b8-e4bddaa44316","available_quantity":998,"options":[{"name":"Color","value":"Pink"}],"off_ratio":0,"flashsale_info":[],"sales":13};
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":"a8abbf97-21ae-435e-80b8-e4bddaa44316","product_id":"549325cd-5b08-40a4-8ceb-d792df34625e","title":"Pink","weight_unit":"kg","inventory_quantity":998,"sku":"BK7046-choker-pink","barcode":"","position":3,"option1":"Pink","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/ebe18d708ace164fbaf46d271327f547.jpeg","path":"ebe18d708ace164fbaf46d271327f547.jpeg","width":640,"height":640,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":19.99,"min_quantity":1}],"weight":"0.23","compare_at_price":"0","price":"19.99","retail_price":"0","available":true,"url":"\/products\/choker-amra?variant=a8abbf97-21ae-435e-80b8-e4bddaa44316","available_quantity":998,"options":[{"name":"Color","value":"Pink"}],"off_ratio":0,"flashsale_info":[],"sales":13};
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 `
`;
}()}