${function() {
const variantData = data.variant || {"id":"b57790da-6708-4d30-a9fc-c44e8c318295","product_id":"342d1781-4e27-4c18-b170-d8275ef33958","title":"Gray","weight_unit":"g","inventory_quantity":999981,"sku":"101739810002","barcode":"GrayA0018022","position":2,"option1":"Gray","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/608355d8490022d4c365c33e99737eb1.jpeg","path":"608355d8490022d4c365c33e99737eb1.jpeg","width":582,"height":713,"alt":"","aspect_ratio":0.8162692847124825},"wholesale_price":[{"price":6.98,"min_quantity":1}],"weight":"50","compare_at_price":"6","price":"6.98","retail_price":"6","available":true,"url":"\/products\/hat-wine-glass-gradient-earrings?variant=b57790da-6708-4d30-a9fc-c44e8c318295","available_quantity":999981,"options":[{"name":"Color","value":"Gray"}],"off_ratio":0,"flashsale_info":[],"sales":75};
const saveType = "percentage";
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 postageFreeAmount = 69;
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 `
`;
}()}
Product was out of stock.
Product is unavailable.
${function(){
const variantData = data.variant || {"id":"b57790da-6708-4d30-a9fc-c44e8c318295","product_id":"342d1781-4e27-4c18-b170-d8275ef33958","title":"Gray","weight_unit":"g","inventory_quantity":999981,"sku":"101739810002","barcode":"GrayA0018022","position":2,"option1":"Gray","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/608355d8490022d4c365c33e99737eb1.jpeg","path":"608355d8490022d4c365c33e99737eb1.jpeg","width":582,"height":713,"alt":"","aspect_ratio":0.8162692847124825},"wholesale_price":[{"price":6.98,"min_quantity":1}],"weight":"50","compare_at_price":"6","price":"6.98","retail_price":"6","available":true,"url":"\/products\/hat-wine-glass-gradient-earrings?variant=b57790da-6708-4d30-a9fc-c44e8c318295","available_quantity":999981,"options":[{"name":"Color","value":"Gray"}],"off_ratio":0,"flashsale_info":[],"sales":75};
return `
`
}()}