${function() {
const variantData = data.variant || {"id":"22346306-89ab-4dc5-a221-7e2d5688c231","product_id":"1b7d998b-5f3c-4cb0-a84e-f1501c1ea2df","title":"muilticolor-S","weight_unit":"kg","inventory_quantity":1000,"sku":"128-240502-A21-MT0071QNR5-muilticolor-S","barcode":"","position":1,"option1":"muilticolor","option2":"S","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/59358eb6fcff81ac900472ef2c383e4b.jpeg","path":"59358eb6fcff81ac900472ef2c383e4b.jpeg","width":1200,"height":1600,"alt":"","aspect_ratio":0.75},"wholesale_price":[{"price":21.99,"min_quantity":1}],"weight":"0","compare_at_price":"21.99","price":"21.99","retail_price":"21.99","available":true,"url":"\/products\/funny-highland-cow-art-design-print-t-shirt?variant=22346306-89ab-4dc5-a221-7e2d5688c231","available_quantity":999999999,"options":[{"name":"Color","value":"muilticolor"},{"name":"Size","value":"S"}],"off_ratio":0,"flashsale_info":[],"sales":0};
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 `
`;
}()}