${function() {
const variantData = data.variant || {"id":"c9a91a9f-d1c0-4f5f-831a-e17bfddfee96","product_id":"0317a390-8181-4cc6-9002-c9f2fc2b5426","title":"Yellow-18K Gold-plated Copper","weight_unit":"kg","inventory_quantity":264,"sku":"680911614786-\u9ec4\u8272-\u94dc\u954018K\u91d1+\u94f6\u8033\u9488-RYEZ002-680911614786","barcode":"","position":1,"option1":"Yellow","option2":"18K Gold-plated Copper","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/d5229c7e5402edee0cd3813cdd490ec7.jpeg","path":"d5229c7e5402edee0cd3813cdd490ec7.jpeg","width":800,"height":800,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":40.37,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"40.37","retail_price":"0","available":true,"url":"\/products\/mermaid-shaped-earrings-18k-gold-plating-yellow-diamond-advanced-earrings?variant=c9a91a9f-d1c0-4f5f-831a-e17bfddfee96","available_quantity":999999999,"options":[{"name":"Color","value":"Yellow"},{"name":"Material","value":"18K Gold-plated Copper"}],"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}
`
}()}
${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":"c9a91a9f-d1c0-4f5f-831a-e17bfddfee96","product_id":"0317a390-8181-4cc6-9002-c9f2fc2b5426","title":"Yellow-18K Gold-plated Copper","weight_unit":"kg","inventory_quantity":264,"sku":"680911614786-\u9ec4\u8272-\u94dc\u954018K\u91d1+\u94f6\u8033\u9488-RYEZ002-680911614786","barcode":"","position":1,"option1":"Yellow","option2":"18K Gold-plated Copper","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/d5229c7e5402edee0cd3813cdd490ec7.jpeg","path":"d5229c7e5402edee0cd3813cdd490ec7.jpeg","width":800,"height":800,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":40.37,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"40.37","retail_price":"0","available":true,"url":"\/products\/mermaid-shaped-earrings-18k-gold-plating-yellow-diamond-advanced-earrings?variant=c9a91a9f-d1c0-4f5f-831a-e17bfddfee96","available_quantity":999999999,"options":[{"name":"Color","value":"Yellow"},{"name":"Material","value":"18K Gold-plated Copper"}],"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 `
`;
}()}