${function() {
const variantData = data.variant || {"id":"f5f7b26f-6c3b-47da-b455-32edda829f29","product_id":"abee8386-dc1f-4abf-93c2-be7bfce36652","title":"All-Match Chain 45+10cm","weight_unit":"kg","inventory_quantity":93,"sku":"655694407564-\u767e\u642d\u94fe45+10cm-Y054-655694407564","barcode":"","position":2,"option1":"All-Match Chain 45+10cm","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/dc5476eff66c367a3802928400771244.jpeg","path":"dc5476eff66c367a3802928400771244.jpeg","width":800,"height":800,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":49.87,"min_quantity":1}],"weight":"0.02","compare_at_price":"0","price":"49.87","retail_price":"0","available":true,"url":"\/products\/high-carbon-diamond-necklace-yellow-diamond-s925-silver-pendant?variant=f5f7b26f-6c3b-47da-b455-32edda829f29","available_quantity":999999999,"options":[{"name":"Style","value":"All-Match Chain 45+10cm"}],"off_ratio":0,"flashsale_info":[],"sales":33};
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":"f5f7b26f-6c3b-47da-b455-32edda829f29","product_id":"abee8386-dc1f-4abf-93c2-be7bfce36652","title":"All-Match Chain 45+10cm","weight_unit":"kg","inventory_quantity":93,"sku":"655694407564-\u767e\u642d\u94fe45+10cm-Y054-655694407564","barcode":"","position":2,"option1":"All-Match Chain 45+10cm","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/dc5476eff66c367a3802928400771244.jpeg","path":"dc5476eff66c367a3802928400771244.jpeg","width":800,"height":800,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":49.87,"min_quantity":1}],"weight":"0.02","compare_at_price":"0","price":"49.87","retail_price":"0","available":true,"url":"\/products\/high-carbon-diamond-necklace-yellow-diamond-s925-silver-pendant?variant=f5f7b26f-6c3b-47da-b455-32edda829f29","available_quantity":999999999,"options":[{"name":"Style","value":"All-Match Chain 45+10cm"}],"off_ratio":0,"flashsale_info":[],"sales":33};
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 `
`;
}()}