${function() {
const variantData = data.variant || {"id":"07fac816-153c-4b2c-a5a2-20f2aadcffc3","product_id":"e2f9da89-51e9-46ca-8afb-12c73bcc3122","title":"PRIDE","weight_unit":"kg","inventory_quantity":999,"sku":"X086-230207-04-HHC4H8AX35-PRIDE","barcode":"","position":2,"option1":"PRIDE","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/2c6a6f282b522245939882e2b6bd1bbe.jpeg","path":"2c6a6f282b522245939882e2b6bd1bbe.jpeg","width":900,"height":1200,"alt":"","aspect_ratio":0.75},"wholesale_price":[{"price":6.99,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"6.99","retail_price":"0","available":true,"url":"\/products\/rainbow-necklace-4?variant=07fac816-153c-4b2c-a5a2-20f2aadcffc3","available_quantity":999999999,"options":[{"name":"Color","value":"PRIDE"}],"off_ratio":0,"flashsale_info":[],"sales":6};
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 `
`;
}()}