${function() {
const variantData = data.variant || {"id":"27cf54ae-1c6f-471f-ac13-954bbfb74829","product_id":"e081d337-e4a4-4c4b-9539-3d7bd640a57e","title":"Copper","weight_unit":"kg","inventory_quantity":945,"sku":"S009-Copper","barcode":"","position":2,"option1":"Copper","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/764d7ddf2a3ecfbdb08a47044e2a1145.jpeg","path":"764d7ddf2a3ecfbdb08a47044e2a1145.jpeg","width":900,"height":1200,"alt":"","aspect_ratio":0.75},"wholesale_price":[{"price":3.99,"min_quantity":1}],"weight":"0","compare_at_price":"6.66","price":"3.99","retail_price":"6.66","available":true,"url":"\/products\/casual-necklaces?variant=27cf54ae-1c6f-471f-ac13-954bbfb74829","available_quantity":999999999,"options":[{"name":"Color","value":"Copper"}],"off_ratio":40,"flashsale_info":[],"sales":92};
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 `
`;
}()}