${function() {
const variantData = data.variant || {"id":"221aa896-828b-4bc5-8cd5-1a22b9cd3242","product_id":"f2277214-9289-4b87-82d4-3ebfd42baada","title":"Orange-One-size","weight_unit":"kg","inventory_quantity":999,"sku":"2050713699296-Orange-One-size","barcode":"","position":2,"option1":"Orange","option2":"One-size","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/4994a7165323e2e611fab8723e6b4630.jpeg","path":"4994a7165323e2e611fab8723e6b4630.jpeg","width":633,"height":506,"alt":"","aspect_ratio":1.2509881422924902},"wholesale_price":[{"price":6.99,"min_quantity":1}],"weight":"0","compare_at_price":"1.99","price":"6.99","retail_price":"1.99","available":true,"url":"\/products\/red-knitted-underwear-socks?variant=221aa896-828b-4bc5-8cd5-1a22b9cd3242","available_quantity":999999999,"options":[{"name":"Color","value":"Orange"},{"name":"Size","value":"One-size"}],"off_ratio":0,"flashsale_info":[],"sales":11};
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 `
`;
}()}