${function() {
const variantData = data.variant || {"id":"a5499e0c-5c4c-47c1-b868-4833db7bee14","product_id":"b37da9d4-98a4-48c7-87dd-3eccfddf6e18","title":"S","weight_unit":"kg","inventory_quantity":1000,"sku":"C02174-S","barcode":"","position":1,"option1":"S","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/c7170f1695cc5c54800ea67f60de7dfe.jpg","path":"c7170f1695cc5c54800ea67f60de7dfe.jpg","width":600,"height":600,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":34.99,"min_quantity":1}],"weight":"0","compare_at_price":"59.99","price":"34.99","retail_price":"59.99","available":true,"url":"\/products\/retro-engine-oil-logo-print-shorts-2?variant=a5499e0c-5c4c-47c1-b868-4833db7bee14","available_quantity":999999999,"options":[{"name":"Size","value":"S"}],"off_ratio":42,"flashsale_info":[],"sales":0};
const saveType = "percentage";
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 variantData = data.variant || {"id":"a5499e0c-5c4c-47c1-b868-4833db7bee14","product_id":"b37da9d4-98a4-48c7-87dd-3eccfddf6e18","title":"S","weight_unit":"kg","inventory_quantity":1000,"sku":"C02174-S","barcode":"","position":1,"option1":"S","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/c7170f1695cc5c54800ea67f60de7dfe.jpg","path":"c7170f1695cc5c54800ea67f60de7dfe.jpg","width":600,"height":600,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":34.99,"min_quantity":1}],"weight":"0","compare_at_price":"59.99","price":"34.99","retail_price":"59.99","available":true,"url":"\/products\/retro-engine-oil-logo-print-shorts-2?variant=a5499e0c-5c4c-47c1-b868-4833db7bee14","available_quantity":999999999,"options":[{"name":"Size","value":"S"}],"off_ratio":42,"flashsale_info":[],"sales":0};
return `
Weight : ${variantData && variantData.weight}${variantData && variantData.weight_unit}
Barcode : ${variantData && variantData.barcode}
`
}()}
${function() {
const postageFreeAmount = 89;
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 `
`;
}()}