${function() {
const variantData = data.variant || {"id":"a2d91cf3-af71-4aa6-9910-c24b7379df43","product_id":"88b9965c-8771-483f-9f58-541de9f6f265","title":"Pink-Onesize","weight_unit":"kg","inventory_quantity":9994,"sku":"BK6000-Pink-Onesize","barcode":"","position":3,"option1":"Pink","option2":"Onesize","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/5a49326e7e89dd589ae2fe07c5d5af23.jpeg","path":"5a49326e7e89dd589ae2fe07c5d5af23.jpeg","width":800,"height":800,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":15.99,"min_quantity":1}],"weight":"0.6","compare_at_price":"0","price":"15.99","retail_price":"0","available":true,"url":"\/products\/sad-face-cap?variant=a2d91cf3-af71-4aa6-9910-c24b7379df43","available_quantity":9994,"options":[{"name":"Color","value":"Pink"},{"name":"Size","value":"Onesize"}],"off_ratio":0,"flashsale_info":[],"sales":11};
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":"a2d91cf3-af71-4aa6-9910-c24b7379df43","product_id":"88b9965c-8771-483f-9f58-541de9f6f265","title":"Pink-Onesize","weight_unit":"kg","inventory_quantity":9994,"sku":"BK6000-Pink-Onesize","barcode":"","position":3,"option1":"Pink","option2":"Onesize","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/5a49326e7e89dd589ae2fe07c5d5af23.jpeg","path":"5a49326e7e89dd589ae2fe07c5d5af23.jpeg","width":800,"height":800,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":15.99,"min_quantity":1}],"weight":"0.6","compare_at_price":"0","price":"15.99","retail_price":"0","available":true,"url":"\/products\/sad-face-cap?variant=a2d91cf3-af71-4aa6-9910-c24b7379df43","available_quantity":9994,"options":[{"name":"Color","value":"Pink"},{"name":"Size","value":"Onesize"}],"off_ratio":0,"flashsale_info":[],"sales":11};
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 `
`;
}()}