${function() {
const variantData = data.variant || {"id":"7b98d848-7a10-4b33-89c3-7fcc9926ecda","product_id":"09a99c32-8ae7-4c22-ac11-e954cad7c0a1","title":"Yellow-0.3L","weight_unit":"kg","inventory_quantity":99,"sku":"OS009PB2333H03","barcode":"","position":1,"option1":"Yellow","option2":"0.3L","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/606dac444e49045c105bf53d1ae71350.jpg","path":"606dac444e49045c105bf53d1ae71350.jpg","width":800,"height":800,"alt":"OKSOU PB300 Multi Function Food Processer with Scale, Wireless Mini Blender Licuadora, 0.3L-0.6L","aspect_ratio":1},"wholesale_price":[{"price":55.99,"min_quantity":1}],"weight":"1.2","compare_at_price":"59.99","price":"55.99","retail_price":"59.99","available":true,"url":"\/products\/oksou-pb300-multi-function-food-processer-with-scale-wireless-mini-blender-licuadora-0-3l-0-6l?variant=7b98d848-7a10-4b33-89c3-7fcc9926ecda","available_quantity":99,"options":[{"name":"Color","value":"Yellow"},{"name":"Size","value":"0.3L"}],"off_ratio":7,"flashsale_info":[],"sales":6};
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 = 39.998;
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 `
`;
}()}