${function() {
const variantData = data.variant || {"id":"ef57053a-a5e3-4614-b005-0e7221954cec","product_id":"22185152-9246-4655-bf7f-c47bd8ee7fe1","title":"Steel Color-No. 7","weight_unit":"kg","inventory_quantity":998,"sku":"CP10410729399L01","barcode":"","position":1,"option1":"Steel Color","option2":"No. 7","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/63ca8cb78bdf87903e6dfe660fda5539.jpeg","path":"63ca8cb78bdf87903e6dfe660fda5539.jpeg","width":700,"height":1000,"alt":"","aspect_ratio":0.7},"wholesale_price":[{"price":8.99,"min_quantity":1}],"weight":"0","compare_at_price":"21.99","price":"8.99","retail_price":"21.99","available":true,"url":"\/products\/cp10410729399?variant=ef57053a-a5e3-4614-b005-0e7221954cec","available_quantity":999999999,"options":[{"name":"Color","value":"Steel Color"},{"name":"Size","value":"No. 7"}],"off_ratio":59,"flashsale_info":[],"sales":5};
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}
`
}()}
Product was out of stock.
Product is unavailable.
${function() {
const postageFreeAmount = 79;
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 `
`;
}()}