${function() {
const variantData = data.variant || {"id":"3fd56b23-78d7-4a9b-989d-7b4e8dd59984","product_id":"b89fb15e-e85c-44e9-a5eb-c1e6b401fc6b","title":"buy 2","weight_unit":"kg","inventory_quantity":0,"sku":"111","barcode":"","position":1,"option1":"buy 2","option2":"","option3":"","note":"","image":null,"wholesale_price":[{"price":17.99,"min_quantity":1}],"weight":"0","compare_at_price":"69.99","price":"17.99","retail_price":"69.99","available":true,"url":"\/products\/massage-and-skin-beauty-multifunctional-shower?variant=3fd56b23-78d7-4a9b-989d-7b4e8dd59984","available_quantity":999999999,"options":[{"name":"buy more save more","value":"buy 2"}],"off_ratio":74,"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 minInventory = parseInt('5');
const maxInventory = parseInt('20');
const randomInventory = Math.round(Math.random() * (maxInventory - minInventory)) + minInventory;
const customText = "Only {stock} item(s) left in stock!".replace(/\{stock\}/g, '' + randomInventory + '');
const barWidth = (randomInventory / maxInventory) * 100 + '%';
return `
`;
}()}
Product was out of stock.
Product is unavailable.
${function(){
const variantData = data.variant || {"id":"3fd56b23-78d7-4a9b-989d-7b4e8dd59984","product_id":"b89fb15e-e85c-44e9-a5eb-c1e6b401fc6b","title":"buy 2","weight_unit":"kg","inventory_quantity":0,"sku":"111","barcode":"","position":1,"option1":"buy 2","option2":"","option3":"","note":"","image":null,"wholesale_price":[{"price":17.99,"min_quantity":1}],"weight":"0","compare_at_price":"69.99","price":"17.99","retail_price":"69.99","available":true,"url":"\/products\/massage-and-skin-beauty-multifunctional-shower?variant=3fd56b23-78d7-4a9b-989d-7b4e8dd59984","available_quantity":999999999,"options":[{"name":"buy more save more","value":"buy 2"}],"off_ratio":74,"flashsale_info":[],"sales":1};
return `
`
}()}
${function() {
const postageFreeAmount = 39;
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 `
`;
}()}
30 days Free returns and exchance
Free shipping order over $39
It's been recommended by 114.3K people on Facebook, Twitter and Instagram