${function() {
const variantData = data.variant || {"id":"fa1b365c-54f8-42c2-9738-50001981b77b","product_id":"9addf356-d0cd-4fc3-9d4e-f3e397ee2997","title":"Picture 2","weight_unit":"kg","inventory_quantity":1000,"sku":"WNP10570-TP2","barcode":"","position":2,"option1":"Picture 2","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/ee4286b26f7ed4b98a8d29e15df41519.jpeg","path":"ee4286b26f7ed4b98a8d29e15df41519.jpeg","width":675,"height":900,"alt":"","aspect_ratio":0.75},"wholesale_price":[{"price":2.99,"min_quantity":1}],"weight":"0","compare_at_price":"4.99","price":"2.99","retail_price":"4.99","available":true,"url":"\/products\/casual-ball-no-stone-pendant-necklaces?variant=fa1b365c-54f8-42c2-9738-50001981b77b","available_quantity":999999999,"options":[{"name":"Color","value":"Picture 2"}],"off_ratio":40,"flashsale_info":[],"sales":7};
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 `
`;
}()}