${function() {
const variantData = data.variant || {"id":"2aee4d5e-b7b9-4482-b536-734c708a92a8","product_id":"4abbba89-28c4-4137-9471-b4bdac3c5fef","title":"Pink","weight_unit":"kg","inventory_quantity":97,"sku":"OS003PB2333C","barcode":"","position":2,"option1":"Pink","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/df4a6c814f44f434c1e743e357ef8a51.jpg","path":"df4a6c814f44f434c1e743e357ef8a51.jpg","width":1000,"height":1000,"alt":"OKSOU PB600 Portable Blender Personal Juicer for Smoothies with Free Travel Cup and Lid, Durable Stainless Steel Blades for Powerful Blending, 600ml","aspect_ratio":1},"wholesale_price":[{"price":45.99,"min_quantity":1}],"weight":"0.7","compare_at_price":"49.99","price":"45.99","retail_price":"49.99","available":true,"url":"\/products\/oksou-pb600-portable-blender-personal-juicer-for-smoothies-with-free-travel-cup-and-lid-durable-stainless-steel-blades-for-powerful-blending-600ml?variant=2aee4d5e-b7b9-4482-b536-734c708a92a8","available_quantity":97,"options":[{"name":"Color","value":"Pink"}],"off_ratio":8,"flashsale_info":[],"sales":30};
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}
`
}()}
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 `
`;
}()}