${function() {
const variantData = data.variant || {"id":"8d3abe5a-1d4e-4d0c-a36b-1f4fb3300a48","product_id":"8d2d04f2-ab0c-47c9-9a16-430d00a115d0","title":"Black-Single","weight_unit":"kg","inventory_quantity":998,"sku":"BK1561-Earrings-Single","barcode":"","position":1,"option1":"Black","option2":"Single","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/7b0bda51c01f658e173c1f1905c69aaf.jpeg","path":"7b0bda51c01f658e173c1f1905c69aaf.jpeg","width":500,"height":500,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":9.99,"min_quantity":1}],"weight":"0.5","compare_at_price":"0","price":"9.99","retail_price":"0","available":true,"url":"\/products\/black-spider-earring?variant=8d3abe5a-1d4e-4d0c-a36b-1f4fb3300a48","available_quantity":998,"options":[{"name":"Color","value":"Black"},{"name":"Style","value":"Single"}],"off_ratio":0,"flashsale_info":[],"sales":1};
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 variantData = data.variant || {"id":"8d3abe5a-1d4e-4d0c-a36b-1f4fb3300a48","product_id":"8d2d04f2-ab0c-47c9-9a16-430d00a115d0","title":"Black-Single","weight_unit":"kg","inventory_quantity":998,"sku":"BK1561-Earrings-Single","barcode":"","position":1,"option1":"Black","option2":"Single","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/7b0bda51c01f658e173c1f1905c69aaf.jpeg","path":"7b0bda51c01f658e173c1f1905c69aaf.jpeg","width":500,"height":500,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":9.99,"min_quantity":1}],"weight":"0.5","compare_at_price":"0","price":"9.99","retail_price":"0","available":true,"url":"\/products\/black-spider-earring?variant=8d3abe5a-1d4e-4d0c-a36b-1f4fb3300a48","available_quantity":998,"options":[{"name":"Color","value":"Black"},{"name":"Style","value":"Single"}],"off_ratio":0,"flashsale_info":[],"sales":1};
return `
`
}()}
${function() {
const postageFreeAmount = 100;
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 `
`;
}()}