${function() {
const variantData = data.variant || {"id":"952d9cd1-c1dc-40f6-8fe5-a407dc44252b","product_id":"2fbd1e2c-1375-43f7-ad0a-794ef13b509b","title":"Wheat-S","weight_unit":"g","inventory_quantity":99999,"sku":"102099320001","barcode":"","position":1,"option1":"Wheat","option2":"S","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/eb2b5da77504b6d65b607a68e6a78ce9.jpeg","path":"eb2b5da77504b6d65b607a68e6a78ce9.jpeg","width":794,"height":794,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":18.98,"min_quantity":1}],"weight":"300","compare_at_price":"39.98","price":"18.98","retail_price":"39.98","available":true,"url":"\/products\/hogwarts-school-of-witchcraft-and-wizardry-printed-womens-sweatshirt?variant=952d9cd1-c1dc-40f6-8fe5-a407dc44252b","available_quantity":99999,"options":[{"name":"Color","value":"Wheat"},{"name":"Size","value":"S"}],"off_ratio":53,"flashsale_info":[],"sales":1};
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 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":"952d9cd1-c1dc-40f6-8fe5-a407dc44252b","product_id":"2fbd1e2c-1375-43f7-ad0a-794ef13b509b","title":"Wheat-S","weight_unit":"g","inventory_quantity":99999,"sku":"102099320001","barcode":"","position":1,"option1":"Wheat","option2":"S","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/eb2b5da77504b6d65b607a68e6a78ce9.jpeg","path":"eb2b5da77504b6d65b607a68e6a78ce9.jpeg","width":794,"height":794,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":18.98,"min_quantity":1}],"weight":"300","compare_at_price":"39.98","price":"18.98","retail_price":"39.98","available":true,"url":"\/products\/hogwarts-school-of-witchcraft-and-wizardry-printed-womens-sweatshirt?variant=952d9cd1-c1dc-40f6-8fe5-a407dc44252b","available_quantity":99999,"options":[{"name":"Color","value":"Wheat"},{"name":"Size","value":"S"}],"off_ratio":53,"flashsale_info":[],"sales":1};
return `
`
}()}