${function() {
const variantData = data.variant || {"id":"d21cef4a-d63a-4b36-bb69-13d36a593a6b","product_id":"b16228bb-ca73-4686-8217-695d218d4a85","title":"rose gold & green stone","weight_unit":"kg","inventory_quantity":0,"sku":"","barcode":"","position":1,"option1":"rose gold & green stone","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/caf2c3c1a88cc32582a23a33950b0e96.jpeg","path":"caf2c3c1a88cc32582a23a33950b0e96.jpeg","width":1000,"height":1000,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":42.71,"min_quantity":1}],"weight":"0","compare_at_price":"189","price":"42.71","retail_price":"189","available":true,"url":"\/products\/color-stone-gear-fidget-ring-gift-for-her-him?variant=d21cef4a-d63a-4b36-bb69-13d36a593a6b","available_quantity":999999999,"options":[{"name":"color","value":"rose gold & green stone"}],"off_ratio":77,"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 + '%'
: ``
)}
`;
}()}
${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 variantData = data.variant || {"id":"d21cef4a-d63a-4b36-bb69-13d36a593a6b","product_id":"b16228bb-ca73-4686-8217-695d218d4a85","title":"rose gold & green stone","weight_unit":"kg","inventory_quantity":0,"sku":"","barcode":"","position":1,"option1":"rose gold & green stone","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/caf2c3c1a88cc32582a23a33950b0e96.jpeg","path":"caf2c3c1a88cc32582a23a33950b0e96.jpeg","width":1000,"height":1000,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":42.71,"min_quantity":1}],"weight":"0","compare_at_price":"189","price":"42.71","retail_price":"189","available":true,"url":"\/products\/color-stone-gear-fidget-ring-gift-for-her-him?variant=d21cef4a-d63a-4b36-bb69-13d36a593a6b","available_quantity":999999999,"options":[{"name":"color","value":"rose gold & green stone"}],"off_ratio":77,"flashsale_info":[],"sales":0};
return `
Barcode : ${variantData && variantData.barcode}
`
}()}
${function() {
const postageFreeAmount = 99;
const custom_text = "STANDARD SHIPPING: $9.90, Free over $99.00";
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 `
`;
}()}
${function() {
const minDays = parseInt('7');
const maxDays = parseInt('15');
const customText = "SHIPPING TIME: 7-15 Working Days \n";
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 `
`;
}()}