${function() {
const variantData = data.variant || {"id":"9cf5a9a2-0c2a-4aea-99fe-bdc316d3f847","product_id":"ce2ab23b-967b-4a65-83d6-eba3fe80414f","title":"","weight_unit":"kg","inventory_quantity":97,"sku":"OS005PB2333A","barcode":"","position":1,"option1":"","option2":"","option3":"","note":"","image":null,"wholesale_price":[{"price":39.99,"min_quantity":1}],"weight":"1","compare_at_price":"45.99","price":"39.99","retail_price":"45.99","available":true,"url":"\/products\/oksou-pb350t-wireless-portable-blender-personal-juicer-perfect-for-frozen-blending-chopping-type-c-charging-with-10-blades-travel-cup-350ml?variant=9cf5a9a2-0c2a-4aea-99fe-bdc316d3f847","available_quantity":97,"options":[],"off_ratio":13,"flashsale_info":[],"sales":0};
const saveType = "amount";
const saveText = "Save {{saved_amount}}";
const productLabelDiscountOn = true;
return `
-
${saveText.replace('\{\{saved_amount\}\}',
saveType == 'percentage'
? variantData.off_ratio + '%'
: ``
)}
`;
}()}
Product was out of stock.
Product is unavailable.
${function() {
const postageFreeAmount = 39.99;
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 `
`;
}()}
people are viewing this right now
${function() {
const minDays = parseInt('4');
const maxDays = parseInt('8');
const customText = "Estimated Delivery\uff1a{min_date} - {max_date}";
const minDate = new Date(Date.now() + (minDays * 86400000));
const maxDate = new Date(Date.now() + (maxDays * 86400000));
const formatDate = (minDate.getFullYear() == maxDate.getFullYear() && minDate.getFullYear() == new Date().getFullYear())
? new Intl.DateTimeFormat('en', { month: 'short', day: '2-digit' })
: new Intl.DateTimeFormat('en', { month: 'short', day: '2-digit', year: 'numeric' });
const tipText = customText.replace(/\{min_date\}/g, '' + formatDate.format(minDate) + '')
.replace(/\{max_date\}/g, '' + formatDate.format(maxDate) + '');
return `
`;
}()}