people are viewing this right now
${function() {
const variantData = data.variant || {"id":"3f379123-ec75-4ba7-9738-8df005672899","product_id":"abb6d402-ac3e-40d7-91d9-1a5617fb9710","title":"Grey-S","weight_unit":"kg","inventory_quantity":0,"sku":"WL2403084065-Grey-S","barcode":"","position":1,"option1":"Grey","option2":"S","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/6c43c401a5c9505e2d5f6149e12bcf53.jpeg","path":"6c43c401a5c9505e2d5f6149e12bcf53.jpeg","width":2160,"height":2158,"alt":"Outletsltd Unisex Oversized Vegeta Anime Printed T-shirt","aspect_ratio":1.0009267840593141},"wholesale_price":[{"price":19.99,"min_quantity":1}],"weight":"250","compare_at_price":"29.98","price":"19.99","retail_price":"29.98","available":true,"url":"\/products\/unisex-oversized-vegeta-anime-printed-t-shirt?variant=3f379123-ec75-4ba7-9738-8df005672899","available_quantity":999999999,"options":[{"name":"Color","value":"Grey"},{"name":"Size","value":"S"}],"off_ratio":33,"flashsale_info":[],"sales":38};
const saveType = "percentage";
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}
`
}()}
${function() {
const minDays = parseInt('8');
const maxDays = parseInt('18');
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 `
`;
}()}
Product was out of stock.
Product is unavailable.
${function() {
const postageFreeAmount = 69;
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 `
`;
}()}