${function() {
const variantData = data.variant || {"id":"3ee80192-6879-43f0-a8be-07c7c204d1b2","product_id":"34a926a9-4318-437b-8132-c8467e2721c9","title":"yellow-S","weight_unit":"kg","inventory_quantity":1000,"sku":"J20230523395SBE-yellow-S","barcode":"","position":1,"option1":"yellow","option2":"S","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/df68ced3a66e85de633a86a38c2c8074.jpeg","path":"df68ced3a66e85de633a86a38c2c8074.jpeg","width":800,"height":800,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":28.99,"min_quantity":1}],"weight":"0","compare_at_price":"38.99","price":"28.99","retail_price":"38.99","available":true,"url":"\/products\/plaid-print-loose-beach-dressc01205b8-6a08-4294-a3a4-46db1460b515?variant=3ee80192-6879-43f0-a8be-07c7c204d1b2","available_quantity":999999999,"options":[{"name":"color","value":"yellow"},{"name":"size","value":"S"}],"off_ratio":26,"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 `
`;
}()}