${function() {
const variantData = data.variant || {"id":"62e1dd8c-feda-470f-9767-7f8328c6209a","product_id":"c9bcb806-37f4-4ec2-852c-e2f1ed72ff95","title":"White\uff08Basic Version\uff09\u270516*8.5*100cm","weight_unit":"g","inventory_quantity":1,"sku":"LE30299345A1+LI10317453BAIA1","barcode":"","position":1,"option1":"White\uff08Basic Version\uff09\u270516*8.5*100cm","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/ada7f0661c1fe129f74699ab5a9dcbbf.png","path":"ada7f0661c1fe129f74699ab5a9dcbbf.png","width":1024,"height":1024,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":29.99,"min_quantity":1}],"weight":"0","compare_at_price":"99.99","price":"29.99","retail_price":"99.99","available":true,"url":"\/products\/dsfsd?variant=62e1dd8c-feda-470f-9767-7f8328c6209a","available_quantity":999999999,"options":[{"name":"\ud83c\udf81Free gifts\ud83d\udc49Dishcloths*4","value":"White\uff08Basic Version\uff09\u270516*8.5*100cm"}],"off_ratio":"70","flashsale_info":{"variant_id":"62e1dd8c-feda-470f-9767-7f8328c6209a","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":"29.99","compare_at_price":"","discount_price":"29.99","customary_saved_price":"","customary_off_ratio":"","discount_saved_price":"","discount_off_ratio":"70","use_before_price":false,"before_price":"","title":"","properties":"","color_setting_promotional_copy":"","discount_quantity":0,"is_need_split":false},"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 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.