${function() {
const variantData = data.variant || {"id":"a10741a0-d6f8-419a-9dae-01fba21e6515","product_id":"18971987-5a6e-48c4-8c8a-366dd27eef0b","title":"30ml-BUY 1","weight_unit":"g","inventory_quantity":1,"sku":"LE70557447","barcode":"","position":1,"option1":"30ml","option2":"BUY 1","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/92c0934159ed9557ec3c9dda0981b0da.jpeg","path":"92c0934159ed9557ec3c9dda0981b0da.jpeg","width":1024,"height":1024,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":9.99,"min_quantity":1}],"weight":"0","compare_at_price":"19.99","price":"9.99","retail_price":"19.99","available":true,"url":"\/products\/rrqge?variant=a10741a0-d6f8-419a-9dae-01fba21e6515","available_quantity":999999999,"options":[{"name":"Net Content","value":"30ml"},{"name":"BUY MORE SAVE MORE","value":"BUY 1"}],"off_ratio":"50","flashsale_info":{"variant_id":"a10741a0-d6f8-419a-9dae-01fba21e6515","product_id":"","quantity":0,"discount_id":"","limit_time":0,"limit_buy":0,"user_limit_buy":0,"discount_sales":0,"discount_sales_rate":"","discount_stock":0,"ends_at":0,"starts_at":0,"allow_oversold":"","allocation_method":"","price":"9.99","compare_at_price":"","discount_price":"9.99","customary_saved_price":"","customary_off_ratio":"","discount_saved_price":"","discount_off_ratio":"50","use_before_price":false,"before_price":"","title":"","properties":"","color_setting_promotional_copy":"","discount_quantity":0,"is_need_split":false},"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}
`
}()}
${function() {
const postageFreeAmount = 30;
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 `
`;
}()}
Product was out of stock.
Product is unavailable.