${function() {
const variantData = data.variant || {"id":"bda1d4ed-3b44-42c2-aac0-91d0b7c70aeb","product_id":"1781a931-5b18-4314-b2ed-66b1b1682034","title":"Sand-S","weight_unit":"kg","inventory_quantity":1000,"sku":"149-231026-A8-MT0071LC7Y-Sand-S","barcode":"","position":1,"option1":"Sand","option2":"S","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/fb754c10821b87db3ac3eef77ed8e7af.jpeg","path":"fb754c10821b87db3ac3eef77ed8e7af.jpeg","width":1701,"height":2268,"alt":"","aspect_ratio":0.75},"wholesale_price":[{"price":19.9,"min_quantity":1}],"weight":"0.2","compare_at_price":"19.9","price":"19.9","retail_price":"19.9","available":true,"url":"\/products\/thats-what-i-do-i-read-books-i-drink-tea-and-i-know-things-funny-owl-letter-t-shirt?variant=bda1d4ed-3b44-42c2-aac0-91d0b7c70aeb","available_quantity":999999999,"options":[{"name":"Color","value":"Sand"},{"name":"Size","value":"S"}],"off_ratio":0,"flashsale_info":[],"sales":4};
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 `
`;
}()}