${function() {
const variantData = data.variant || {"id":"f7483ef7-3562-4dc8-a3c6-4fd98f0cf5c6","product_id":"6594fc68-b850-4142-9452-687dc7bb36da","title":"Black-S","weight_unit":"kg","inventory_quantity":1000,"sku":"GR040105-Black-S","barcode":"","position":13,"option1":"Black","option2":"S","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/9722c084dcd0e3ebfa491dcaaf51c852.jpg","path":"9722c084dcd0e3ebfa491dcaaf51c852.jpg","width":2362,"height":3073,"alt":"","aspect_ratio":0.768630003254149},"wholesale_price":[{"price":22.99,"min_quantity":1}],"weight":"0","compare_at_price":"40","price":"22.99","retail_price":"40","available":true,"url":"\/products\/the-beauty-of-slience-shiny-moon-phase-t-shirt?variant=f7483ef7-3562-4dc8-a3c6-4fd98f0cf5c6","available_quantity":999999999,"options":[{"name":"Color","value":"Black"},{"name":"Size","value":"S"}],"off_ratio":43,"flashsale_info":[],"sales":18};
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 `
`;
}()}