${function() {
const variantData = data.variant || {"id":"1af98e32-ad77-490a-9548-22eff58c1e78","product_id":"db3f1901-719f-46d8-a2d4-06e417d9e453","title":"Blue","weight_unit":"kg","inventory_quantity":998,"sku":"EA8S6FBB2084","barcode":"","position":2,"option1":"Blue","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/d62ab4d2f1f1c8295be254c7828ec41d.jpeg","path":"d62ab4d2f1f1c8295be254c7828ec41d.jpeg","width":1200,"height":1600,"alt":"","aspect_ratio":0.75},"wholesale_price":[{"price":4.94,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"4.94","retail_price":"0","available":true,"url":"\/products\/fashion-round-cutout-flower-earrings?variant=1af98e32-ad77-490a-9548-22eff58c1e78","available_quantity":999999999,"options":[{"name":"Color","value":"Blue"}],"off_ratio":0,"flashsale_info":[],"sales":56};
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}
`
}()}
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 `
`;
}()}