${function() {
const variantData = data.variant || {"id":"3523ad92-28a9-481f-9be2-bd5ab4e36b7e","product_id":"84a52c02-88ef-46e0-b8aa-e690e6b4e446","title":"White-S","weight_unit":"kg","inventory_quantity":1000,"sku":"PH1-220228-33-White-S","barcode":"","position":1,"option1":"White","option2":"S","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/7747f8f16b4def78f3ab9e7ab346d3b9.gif","path":"7747f8f16b4def78f3ab9e7ab346d3b9.gif","width":900,"height":1200,"alt":"","aspect_ratio":0.75},"wholesale_price":[{"price":20.69,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"20.69","retail_price":"0","available":true,"url":"\/products\/loose-solid-color-all-match-casual-pants-5077317?variant=3523ad92-28a9-481f-9be2-bd5ab4e36b7e","available_quantity":999999999,"options":[{"name":"Color","value":"White"},{"name":"Size","value":"S"}],"off_ratio":0,"flashsale_info":[],"sales":9};
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 = 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 `
`;
}()}