${function() {
const variantData = data.variant || {"id":"0fe29421-de86-4837-aafd-398ed238c9ae","product_id":"d2fb9af1-e21a-4c70-87fa-993ba99ee242","title":"green-S","weight_unit":"kg","inventory_quantity":1000,"sku":"PH1-220612-74-green-S","barcode":"","position":3,"option1":"green","option2":"S","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/f2bd774c528d3a23f7dd1b91f5ee2cb7.jpeg","path":"f2bd774c528d3a23f7dd1b91f5ee2cb7.jpeg","width":675,"height":900,"alt":"","aspect_ratio":0.75},"wholesale_price":[{"price":19.89,"min_quantity":1}],"weight":"0","compare_at_price":"29.89","price":"19.89","retail_price":"29.89","available":true,"url":"\/products\/fashion-solid-color-pocket-short-sleeve-t-shirt?variant=0fe29421-de86-4837-aafd-398ed238c9ae","available_quantity":999999999,"options":[{"name":"color","value":"green"},{"name":"size","value":"S"}],"off_ratio":33,"flashsale_info":[],"sales":12};
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 `
`;
}()}