${function() {
const variantData = data.variant || {"id":"a235657f-e447-411b-9fe5-e6769789f9ba","product_id":"d3e50fd5-9b62-4113-a696-d8c44eaa867f","title":"Black-One Size","weight_unit":"kg","inventory_quantity":932,"sku":"BK7084-onesize-black","barcode":"","position":1,"option1":"Black","option2":"One Size","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/6fc4d61ad6181318afa3daa65a9a6ec0.jpeg","path":"6fc4d61ad6181318afa3daa65a9a6ec0.jpeg","width":600,"height":600,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":16.99,"min_quantity":1}],"weight":"0.2","compare_at_price":"0","price":"16.99","retail_price":"0","available":true,"url":"\/products\/gothic-harness?variant=a235657f-e447-411b-9fe5-e6769789f9ba","available_quantity":932,"options":[{"name":"Color","value":"Black"},{"name":"Size","value":"One Size"}],"off_ratio":0,"flashsale_info":[],"sales":39};
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":"a235657f-e447-411b-9fe5-e6769789f9ba","product_id":"d3e50fd5-9b62-4113-a696-d8c44eaa867f","title":"Black-One Size","weight_unit":"kg","inventory_quantity":932,"sku":"BK7084-onesize-black","barcode":"","position":1,"option1":"Black","option2":"One Size","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/6fc4d61ad6181318afa3daa65a9a6ec0.jpeg","path":"6fc4d61ad6181318afa3daa65a9a6ec0.jpeg","width":600,"height":600,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":16.99,"min_quantity":1}],"weight":"0.2","compare_at_price":"0","price":"16.99","retail_price":"0","available":true,"url":"\/products\/gothic-harness?variant=a235657f-e447-411b-9fe5-e6769789f9ba","available_quantity":932,"options":[{"name":"Color","value":"Black"},{"name":"Size","value":"One Size"}],"off_ratio":0,"flashsale_info":[],"sales":39};
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 `
`;
}()}