${function() {
const variantData = data.variant || {"id":"e65b517b-6fd4-4c30-bf58-eca9ecaac7a7","product_id":"88d43676-be47-4276-bfef-91c25b5a3aff","title":"Black-2XL","weight_unit":"kg","inventory_quantity":1000,"sku":"PH1-220228-33-Black-2XL","barcode":"","position":10,"option1":"Black","option2":"2XL","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/8bbc4800dc19536f06599f598f7d4406.jpeg","path":"8bbc4800dc19536f06599f598f7d4406.jpeg","width":1200,"height":1600,"alt":"","aspect_ratio":0.75},"wholesale_price":[{"price":19.99,"min_quantity":1}],"weight":"0","compare_at_price":"33.32","price":"19.99","retail_price":"33.32","available":true,"url":"\/products\/casual-pockets-plain-all-season-drawstring-plus-size-pants?variant=e65b517b-6fd4-4c30-bf58-eca9ecaac7a7","available_quantity":999999999,"options":[{"name":"Color","value":"Black"},{"name":"Size","value":"2XL"}],"off_ratio":40,"flashsale_info":[],"sales":21};
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 `
`;
}()}