${function() {
const variantData = data.variant || {"id":"81257b37-d42f-46d9-b04c-ef3ffa59db6c","product_id":"8e887093-6515-499d-af52-507fc7e8a7cb","title":"18K Gold-plated Copper-Copper Plating 18K Gold","weight_unit":"kg","inventory_quantity":311,"sku":"677486666205-\u767d\u91d1\u8272-\u94dc\u954018K\u91d1-YL02-677486666205","barcode":"","position":1,"option1":"18K Gold-plated Copper","option2":"Copper Plating 18K Gold","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/0f166bc883fbaaadb6867983781af474.jpeg","path":"0f166bc883fbaaadb6867983781af474.jpeg","width":800,"height":800,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":41.23,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"41.23","retail_price":"0","available":true,"url":"\/products\/full-diamond-clover-womens-bracelet-gold-plated-womens-bracelet?variant=81257b37-d42f-46d9-b04c-ef3ffa59db6c","available_quantity":999999999,"options":[{"name":"Material","value":"18K Gold-plated Copper"},{"name":"Style","value":"Copper Plating 18K Gold"}],"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":"81257b37-d42f-46d9-b04c-ef3ffa59db6c","product_id":"8e887093-6515-499d-af52-507fc7e8a7cb","title":"18K Gold-plated Copper-Copper Plating 18K Gold","weight_unit":"kg","inventory_quantity":311,"sku":"677486666205-\u767d\u91d1\u8272-\u94dc\u954018K\u91d1-YL02-677486666205","barcode":"","position":1,"option1":"18K Gold-plated Copper","option2":"Copper Plating 18K Gold","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/0f166bc883fbaaadb6867983781af474.jpeg","path":"0f166bc883fbaaadb6867983781af474.jpeg","width":800,"height":800,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":41.23,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"41.23","retail_price":"0","available":true,"url":"\/products\/full-diamond-clover-womens-bracelet-gold-plated-womens-bracelet?variant=81257b37-d42f-46d9-b04c-ef3ffa59db6c","available_quantity":999999999,"options":[{"name":"Material","value":"18K Gold-plated Copper"},{"name":"Style","value":"Copper Plating 18K Gold"}],"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 `
`;
}()}