${function() {
const variantData = data.variant || {"id":"39ca0e3c-0408-4523-a9a5-cf22ddb7ce1b","product_id":"be78623b-8af1-4ee4-8fea-98ac2985082b","title":"Photo Color-S","weight_unit":"g","inventory_quantity":857,"sku":"SKU102454320001","barcode":"","position":1,"option1":"Photo Color","option2":"S","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/5ac4555e0a79502df7fddccbf17cc480.jpeg","path":"5ac4555e0a79502df7fddccbf17cc480.jpeg","width":900,"height":1200,"alt":"","aspect_ratio":0.75},"wholesale_price":[{"price":29.98,"min_quantity":1}],"weight":"400","compare_at_price":"42.98","price":"29.98","retail_price":"42.98","available":true,"url":"\/products\/i-ghost-people-all-year-round-printed-womens-sweatshirt?variant=39ca0e3c-0408-4523-a9a5-cf22ddb7ce1b","available_quantity":857,"options":[{"name":"Color","value":"Photo Color"},{"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":"39ca0e3c-0408-4523-a9a5-cf22ddb7ce1b","product_id":"be78623b-8af1-4ee4-8fea-98ac2985082b","title":"Photo Color-S","weight_unit":"g","inventory_quantity":857,"sku":"SKU102454320001","barcode":"","position":1,"option1":"Photo Color","option2":"S","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/5ac4555e0a79502df7fddccbf17cc480.jpeg","path":"5ac4555e0a79502df7fddccbf17cc480.jpeg","width":900,"height":1200,"alt":"","aspect_ratio":0.75},"wholesale_price":[{"price":29.98,"min_quantity":1}],"weight":"400","compare_at_price":"42.98","price":"29.98","retail_price":"42.98","available":true,"url":"\/products\/i-ghost-people-all-year-round-printed-womens-sweatshirt?variant=39ca0e3c-0408-4523-a9a5-cf22ddb7ce1b","available_quantity":857,"options":[{"name":"Color","value":"Photo Color"},{"name":"Size","value":"S"}],"off_ratio":30,"flashsale_info":[],"sales":0};
return `
`
}()}