${function() {
const variantData = data.variant || {"id":"257fbda0-b498-43e8-98ea-58a50a9d39af","product_id":"a4cf880b-4026-4e5f-a197-7300c9a5bb15","title":"BlackMedium","weight_unit":"kg","inventory_quantity":998,"sku":"X086-230207-09-5DZL45USW7-BlackMedium","barcode":"","position":3,"option1":"BlackMedium","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/bf51f4077654952ecda08e2b5b177385.jpeg","path":"bf51f4077654952ecda08e2b5b177385.jpeg","width":900,"height":1200,"alt":"","aspect_ratio":0.75},"wholesale_price":[{"price":5.99,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"5.99","retail_price":"0","available":true,"url":"\/products\/rainbow-sock-3?variant=257fbda0-b498-43e8-98ea-58a50a9d39af","available_quantity":999999999,"options":[{"name":"Color","value":"BlackMedium"}],"off_ratio":0,"flashsale_info":[],"sales":42};
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}
`
}()}
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 `
`;
}()}