${function() {
const variantData = data.variant || {"id":"17eb0f8e-cb08-423e-9695-ff9bff0f855a","product_id":"f790d063-5cde-40d2-8bb1-53db5f9ba66f","title":"SILVER-One-size","weight_unit":"kg","inventory_quantity":1000,"sku":"CP10390530675L01","barcode":"","position":1,"option1":"SILVER","option2":"One-size","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/5ee6fc6f4ec8b68a62c4805be09aaf95.jpeg","path":"5ee6fc6f4ec8b68a62c4805be09aaf95.jpeg","width":800,"height":800,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":9.99,"min_quantity":1}],"weight":"0","compare_at_price":"21.99","price":"9.99","retail_price":"21.99","available":true,"url":"\/products\/rainbow-cylindrical-pendant-necklace?variant=17eb0f8e-cb08-423e-9695-ff9bff0f855a","available_quantity":999999999,"options":[{"name":"color","value":"SILVER"},{"name":"Size","value":"One-size"}],"off_ratio":55,"flashsale_info":[],"sales":4};
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}
`
}()}
${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 `
`;
}()}