${function() {
const variantData = data.variant || {"id":"aa9776c9-473c-4bd9-ad4b-2e2208becf21","product_id":"db3f1901-719f-46d8-a2d4-06e417d9e453","title":"Multicolor","weight_unit":"kg","inventory_quantity":945,"sku":"EA8S6FBBB1FE","barcode":"","position":1,"option1":"Multicolor","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/9c9c84f7e7b7a6ed4d1ac814750787ee.jpeg","path":"9c9c84f7e7b7a6ed4d1ac814750787ee.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=aa9776c9-473c-4bd9-ad4b-2e2208becf21","available_quantity":999999999,"options":[{"name":"Color","value":"Multicolor"}],"off_ratio":0,"flashsale_info":[],"sales":61};
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 `
`;
}()}