${function() {
const variantData = data.variant || {"id":"21ef55b2-914d-4ddc-a8a1-d8f901f9df24","product_id":"ca864e82-f85b-4db4-a4c7-8ab1eb39cdab","title":"White-S","weight_unit":"g","inventory_quantity":573,"sku":"SKU102458280001","barcode":"","position":1,"option1":"White","option2":"S","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/a886be70e98bed77b512fb2c83ccfb89.jpeg","path":"a886be70e98bed77b512fb2c83ccfb89.jpeg","width":714,"height":946,"alt":"","aspect_ratio":0.7547568710359408},"wholesale_price":[{"price":27.98,"min_quantity":1}],"weight":"450","compare_at_price":"39.98","price":"27.98","retail_price":"39.98","available":true,"url":"\/products\/tonight-we-fly-printed-womens-sweatshirt?variant=21ef55b2-914d-4ddc-a8a1-d8f901f9df24","available_quantity":573,"options":[{"name":"Color","value":"White"},{"name":"Size","value":"S"}],"off_ratio":30,"flashsale_info":[],"sales":0};
const saveType = "percentage";
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 = 69;
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.
${function(){
const variantData = data.variant || {"id":"21ef55b2-914d