${function() {
const variantData = data.variant || {"id":"135bd39a-6b3e-48b3-b6e3-d90eba22da1e","product_id":"c5bd7de5-feda-449e-b8c5-d2fdc379c43f","title":"Green-S","weight_unit":"kg","inventory_quantity":1000,"sku":"WTS180707-GRN00S","barcode":"","position":1,"option1":"Green","option2":"S","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/5f01aa04508a813a61fbfcce0d10eb4d.png","path":"5f01aa04508a813a61fbfcce0d10eb4d.png","width":560,"height":746,"alt":"","aspect_ratio":0.7506702412868632},"wholesale_price":[{"price":21.99,"min_quantity":1}],"weight":"0","compare_at_price":"40.99","price":"21.99","retail_price":"40.99","available":true,"url":"\/products\/womens-slaince-print-round-neck-casual-t-shirt?variant=135bd39a-6b3e-48b3-b6e3-d90eba22da1e","available_quantity":999999999,"options":[{"name":"Color","value":"Green"},{"name":"Size","value":"S"}],"off_ratio":46,"flashsale_info":[],"sales":3};
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 `
`;
}()}