${function() {
const variantData = data.variant || {"id":"365b1bca-e6ef-44cc-915e-6b0010f3409a","product_id":"532e86ca-9c4e-4d87-96e2-27ec9585ba3e","title":"Cotton-38cm","weight_unit":"kg","inventory_quantity":999,"sku":"BK3255- Cotton-38cm","barcode":"","position":3,"option1":"Cotton","option2":"38cm","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/7169e1709525e369457c533132c7241c.jpeg","path":"7169e1709525e369457c533132c7241c.jpeg","width":750,"height":750,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":9.99,"min_quantity":1}],"weight":"0.3","compare_at_price":"0","price":"9.99","retail_price":"0","available":true,"url":"\/products\/japanese-school-uniform-socks-with-leg-ring?variant=365b1bca-e6ef-44cc-915e-6b0010f3409a","available_quantity":999,"options":[{"name":"Material","value":"Cotton"},{"name":"Size","value":"38cm"}],"off_ratio":0,"flashsale_info":[],"sales":2};
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":"365b1bca-e6ef-44cc-915e-6b0010f3409a","product_id":"532e86ca-9c4e-4d87-96e2-27ec9585ba3e","title":"Cotton-38cm","weight_unit":"kg","inventory_quantity":999,"sku":"BK3255- Cotton-38cm","barcode":"","position":3,"option1":"Cotton","option2":"38cm","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/7169e1709525e369457c533132c7241c.jpeg","path":"7169e1709525e369457c533132c7241c.jpeg","width":750,"height":750,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":9.99,"min_quantity":1}],"weight":"0.3","compare_at_price":"0","price":"9.99","retail_price":"0","available":true,"url":"\/products\/japanese-school-uniform-socks-with-leg-ring?variant=365b1bca-e6ef-44cc-915e-6b0010f3409a","available_quantity":999,"options":[{"name":"Material","value":"Cotton"},{"name":"Size","value":"38cm"}],"off_ratio":0,"flashsale_info":[],"sales":2};
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 `
`;
}()}