${function() {
const variantData = data.variant || {"id":"0905589b-47d1-42b8-8673-b0c9348e5864","product_id":"daad8b5e-1467-463d-a159-8464cfceeeaf","title":"","weight_unit":"kg","inventory_quantity":986,"sku":"DM029283_blue","barcode":"","position":1,"option1":"","option2":"","option3":"","note":"","image":null,"wholesale_price":[{"price":3.99,"min_quantity":1}],"weight":"0","compare_at_price":"6","price":"3.99","retail_price":"6","available":true,"url":"\/products\/pearl-tassel-ear-jewelry-long-accessories?variant=0905589b-47d1-42b8-8673-b0c9348e5864","available_quantity":999999999,"options":[],"off_ratio":34,"flashsale_info":[],"sales":14};
const saveType = "amount";
const saveText = "Save {{saved_amount}}";
const productLabelDiscountOn = true;
return `
-
${saveText.replace('\{\{saved_amount\}\}',
saveType == 'percentage'
? variantData.off_ratio + '%'
: ``
)}
`;
}()}
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 `
`;
}()}