${function() {
const variantData = data.variant || {"id":"a475ff6d-8681-4ff6-af89-dcd1b1374d1a","product_id":"cb151637-a8ff-4aa6-b857-dfee00afcd48","title":"Sliver","weight_unit":"kg","inventory_quantity":966,"sku":"EA5F842797E8","barcode":"","position":1,"option1":"Sliver","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/6a1958d7950115a8d67cdac54ac2336e.jpeg","path":"6a1958d7950115a8d67cdac54ac2336e.jpeg","width":400,"height":400,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":3.34,"min_quantity":1}],"weight":"0","compare_at_price":"5.34","price":"3.34","retail_price":"5.34","available":true,"url":"\/products\/woman-sliver-vintage-tribal-holiday-earrings?variant=a475ff6d-8681-4ff6-af89-dcd1b1374d1a","available_quantity":999999999,"options":[{"name":"Color","value":"Sliver"}],"off_ratio":37,"flashsale_info":[],"sales":34};
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 `
`;
}()}