${function() {
const variantData = data.variant || {"id":"6fed15e5-e44b-434b-b931-6e5b7410a2a2","product_id":"16393fba-e57a-4457-845c-7d5bb0e81adf","title":"apricot-L","weight_unit":"kg","inventory_quantity":0,"sku":"66210922745-apricot-L","barcode":"","position":1,"option1":"apricot","option2":"L","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/0c66d9bf843d4b81ca8f9f35d0103bbf.jpeg","path":"0c66d9bf843d4b81ca8f9f35d0103bbf.jpeg","width":800,"height":800,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":66.67,"min_quantity":1}],"weight":"0","compare_at_price":"81.3","price":"66.67","retail_price":"81.3","available":true,"url":"\/products\/two-piece-sweater-for-autumn-and-winter-design?variant=6fed15e5-e44b-434b-b931-6e5b7410a2a2","available_quantity":999999999,"options":[{"name":"color","value":"apricot"},{"name":"size","value":"L"}],"off_ratio":18,"flashsale_info":[],"sales":3};
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 postageFreeAmount = 69;
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 `
`;
}()}