${function() {
const variantData = data.variant || {"id":"ed1f3a08-0d36-42ca-938f-c414560a376a","product_id":"06348b64-20dd-4819-ac10-f62d55398e73","title":"Black-Onesize","weight_unit":"kg","inventory_quantity":975,"sku":"BK1975-Choker-Black","barcode":"","position":1,"option1":"Black","option2":"Onesize","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/b83d71acc7d4dd7d7a8471b992f01273.jpeg","path":"b83d71acc7d4dd7d7a8471b992f01273.jpeg","width":302,"height":452,"alt":"","aspect_ratio":0.668141592920354},"wholesale_price":[{"price":19.99,"min_quantity":1}],"weight":"0.6","compare_at_price":"0","price":"19.99","retail_price":"0","available":true,"url":"\/products\/heart-lock-choker?variant=ed1f3a08-0d36-42ca-938f-c414560a376a","available_quantity":975,"options":[{"name":"Color","value":"Black"},{"name":"Size","value":"Onesize"}],"off_ratio":0,"flashsale_info":[],"sales":12};
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":"ed1f3a08-0d36-42ca-938f-c414560a376a","product_id":"06348b64-20dd-4819-ac10-f62d55398e73","title":"Black-Onesize","weight_unit":"kg","inventory_quantity":975,"sku":"BK1975-Choker-Black","barcode":"","position":1,"option1":"Black","option2":"Onesize","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/b83d71acc7d4dd7d7a8471b992f01273.jpeg","path":"b83d71acc7d4dd7d7a8471b992f01273.jpeg","width":302,"height":452,"alt":"","aspect_ratio":0.668141592920354},"wholesale_price":[{"price":19.99,"min_quantity":1}],"weight":"0.6","compare_at_price":"0","price":"19.99","retail_price":"0","available":true,"url":"\/products\/heart-lock-choker?variant=ed1f3a08-0d36-42ca-938f-c414560a376a","available_quantity":975,"options":[{"name":"Color","value":"Black"},{"name":"Size","value":"Onesize"}],"off_ratio":0,"flashsale_info":[],"sales":12};
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 `
`;
}()}