${function() {
const variantData = data.variant || {"id":"10a2c634-66fe-4625-8ce3-60dc6552e469","product_id":"e5a237e4-cc38-4a2a-aa7a-77e0fff9a73b","title":"Color3-One-size","weight_unit":"kg","inventory_quantity":1000,"sku":"13411346-Color3-One-size","barcode":"","position":3,"option1":"Color3","option2":"One-size","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/1433ef0d947d0b0bfa1d211417e964d7.jpeg","path":"1433ef0d947d0b0bfa1d211417e964d7.jpeg","width":633,"height":844,"alt":"","aspect_ratio":0.75},"wholesale_price":[{"price":4.99,"min_quantity":1}],"weight":"0","compare_at_price":"4.99","price":"4.99","retail_price":"4.99","available":true,"url":"\/products\/time-stone-floral-earrings?variant=10a2c634-66fe-4625-8ce3-60dc6552e469","available_quantity":999999999,"options":[{"name":"Color","value":"Color3"},{"name":"Size","value":"One-size"}],"off_ratio":0,"flashsale_info":[],"sales":15};
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 `
`;
}()}