${function() {
const variantData = data.variant || {"id":"a89b2a60-f401-4494-af28-e8555f9bd8cf","product_id":"d2fb9af1-e21a-4c70-87fa-993ba99ee242","title":"black-S","weight_unit":"kg","inventory_quantity":1000,"sku":"PH1-220612-74-black-S","barcode":"","position":2,"option1":"black","option2":"S","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/2c53b9eafc110881b6a5fd8709756a2d.jpeg","path":"2c53b9eafc110881b6a5fd8709756a2d.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=a89b2a60-f401-4494-af28-e8555f9bd8cf","available_quantity":999999999,"options":[{"name":"color","value":"black"},{"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 `
`;
}()}