${function() {
const variantData = data.variant || {"id":"31330ab7-13ca-4ac8-9b0a-fccc9fe63846","product_id":"65431fac-0d72-4b43-af1d-bfbdf1f1e8fd","title":"S","weight_unit":"lb","inventory_quantity":995,"sku":"SQ-240509-29-S","barcode":"","position":1,"option1":"S","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/9f33f94732d056fccb09bd42c06bae07.jpeg","path":"9f33f94732d056fccb09bd42c06bae07.jpeg","width":900,"height":1200,"alt":"","aspect_ratio":0.75},"wholesale_price":[{"price":16.99,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"16.99","retail_price":"0","available":true,"url":"\/products\/womens-rainbow-stripe-print-tank-top-3bwe6aa2842c-3bda-400e-a0f9-b0063305a119?variant=31330ab7-13ca-4ac8-9b0a-fccc9fe63846","available_quantity":999999999,"options":[{"name":"Size","value":"S"}],"off_ratio":0,"flashsale_info":[],"sales":40};
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 postageFreeAmount = 79;
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 `
`;
}()}