${function() {
const variantData = data.variant || {"id":"ce25ab86-5763-48bf-b13f-056f3a951a51","product_id":"a6de5c33-ce57-447e-b27e-30b0ed01f235","title":"Blue","weight_unit":"kg","inventory_quantity":984,"sku":"","barcode":"","position":2,"option1":"Blue","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/da953fb48320894c949005163245f6a1.jpeg","path":"da953fb48320894c949005163245f6a1.jpeg","width":591,"height":594,"alt":"","aspect_ratio":0.9949494949494949},"wholesale_price":[{"price":3.99,"min_quantity":1}],"weight":"0","compare_at_price":"5.64","price":"3.99","retail_price":"5.64","available":true,"url":"\/products\/vintage-earrings-1?variant=ce25ab86-5763-48bf-b13f-056f3a951a51","available_quantity":999999999,"options":[{"name":"Color","value":"Blue"}],"off_ratio":29,"flashsale_info":[],"sales":53};
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 `
`;
}()}