${function() {
const variantData = data.variant || {"id":"4897b9c2-71a0-4aac-a392-9d614c0900cb","product_id":"019a89fa-2e03-468f-bb43-a47d942b287f","title":"Yellow-S","weight_unit":"g","inventory_quantity":529,"sku":"SKU102454750001","barcode":"","position":1,"option1":"Yellow","option2":"S","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/b64483c9a9f3bb4a92853c66d3bdb1a4.jpeg","path":"b64483c9a9f3bb4a92853c66d3bdb1a4.jpeg","width":900,"height":1200,"alt":"","aspect_ratio":0.75},"wholesale_price":[{"price":37.98,"min_quantity":1}],"weight":"400","compare_at_price":"42","price":"37.98","retail_price":"42","available":true,"url":"\/products\/flower-oil-painting-short-sleeve-cotton-linen-dress?variant=4897b9c2-71a0-4aac-a392-9d614c0900cb","available_quantity":529,"options":[{"name":"Color","value":"Yellow"},{"name":"Size","value":"S"}],"off_ratio":10,"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":"4897b9c2-71a0-4aac-a392-9d614c0900cb","product_id":"019a89fa-2e03-468f-bb43-a47d942b287f","title":"Yellow-S","weight_unit":"g","inventory_quantity":529,"sku":"SKU102454750001","barcode":"","position":1,"option1":"Yellow","option2":"S","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/b64483c9a9f3bb4a92853c66d3bdb1a4.jpeg","path":"b64483c9a9f3bb4a92853c66d3bdb1a4.jpeg","width":900,"height":1200,"alt":"","aspect_ratio":0.75},"wholesale_price":[{"price":37.98,"min_quantity":1}],"weight":"400","compare_at_price":"42","price":"37.98","retail_price":"42","available":true,"url":"\/products\/flower-oil-painting-short-sleeve-cotton-linen-dress?variant=4897b9c2-71a0-4aac-a392-9d614c0900cb","available_quantity":529,"options":[{"name":"Color","value":"Yellow"},{"name":"Size","value":"S"}],"off_ratio":10,"flashsale_info":[],"sales":0};
return `
`
}()}