${function() {
const variantData = data.variant || {"id":"a1d31f1e-eb36-4863-bf29-f5b58ab06bad","product_id":"ef806d6a-1ee0-4885-a693-1f99aa9089bc","title":"White-2XL","weight_unit":"kg","inventory_quantity":1000,"sku":"SPHX20212017-White-2XL","barcode":"","position":1,"option1":"White","option2":"2XL","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/ed0649ce0489a694255e189d9eb1d9bf.png","path":"ed0649ce0489a694255e189d9eb1d9bf.png","width":702,"height":932,"alt":"","aspect_ratio":0.7532188841201717},"wholesale_price":[{"price":23.8,"min_quantity":1}],"weight":"0","compare_at_price":"28","price":"23.8","retail_price":"28","available":true,"url":"\/products\/casual-pants?variant=a1d31f1e-eb36-4863-bf29-f5b58ab06bad","available_quantity":999999999,"options":[{"name":"Color","value":"White"},{"name":"Size","value":"2XL"}],"off_ratio":15,"flashsale_info":[],"sales":8};
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 `
`;
}()}