${function() {
const variantData = data.variant || {"id":"3ae9025b-942b-4df2-8680-1ac49561c1ed","product_id":"e684beb0-99b6-4218-9053-60718631636c","title":"Purple-S","weight_unit":"kg","inventory_quantity":999,"sku":"BK7153-purple-S","barcode":"","position":4,"option1":"Purple","option2":"S","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/976856d8ba77a999d5a0008247b69a43.jpeg","path":"976856d8ba77a999d5a0008247b69a43.jpeg","width":800,"height":800,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":34.99,"min_quantity":1}],"weight":"0.6","compare_at_price":"74.99","price":"34.99","retail_price":"74.99","available":true,"url":"\/products\/vintage-slit-velvet-dress?variant=3ae9025b-942b-4df2-8680-1ac49561c1ed","available_quantity":999,"options":[{"name":"Color","value":"Purple"},{"name":"Size","value":"S"}],"off_ratio":53,"flashsale_info":[],"sales":2};
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 variantData = data.variant || {"id":"3ae9025b-942b-4df2-8680-1ac49561c1ed","product_id":"e684beb0-99b6-4218-9053-60718631636c","title":"Purple-S","weight_unit":"kg","inventory_quantity":999,"sku":"BK7153-purple-S","barcode":"","position":4,"option1":"Purple","option2":"S","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/976856d8ba77a999d5a0008247b69a43.jpeg","path":"976856d8ba77a999d5a0008247b69a43.jpeg","width":800,"height":800,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":34.99,"min_quantity":1}],"weight":"0.6","compare_at_price":"74.99","price":"34.99","retail_price":"74.99","available":true,"url":"\/products\/vintage-slit-velvet-dress?variant=3ae9025b-942b-4df2-8680-1ac49561c1ed","available_quantity":999,"options":[{"name":"Color","value":"Purple"},{"name":"Size","value":"S"}],"off_ratio":53,"flashsale_info":[],"sales":2};
return `
`
}()}
${function() {
const postageFreeAmount = 100;
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 `
`;
}()}