KUGOO KIRIN M4&M4pro Led Headlight
${function() {
const variantData = data.variant || {"id":"0aa48f09-6340-459f-ac5d-17b9437387b1","product_id":"70ccdb7a-e0f7-4787-bd22-f531b2e5f31c","title":"M4&M4pro","weight_unit":"kg","inventory_quantity":98,"sku":"M4&M4pro-\u524d\u5927\u706f","barcode":"","position":1,"option1":"M4&M4pro","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/f9ee71809d3e8391bc1bbe7554278080.jpeg","path":"f9ee71809d3e8391bc1bbe7554278080.jpeg","width":600,"height":787,"alt":"","aspect_ratio":0.7623888182973316},"wholesale_price":[{"price":32,"min_quantity":1}],"weight":"0","compare_at_price":"50","price":"32","retail_price":"50","available":true,"url":"\/products\/kugoo-kirin-m4m4pro-led-headlight?variant=0aa48f09-6340-459f-ac5d-17b9437387b1","available_quantity":999999999,"options":[{"name":"style","value":"M4&M4pro"}],"off_ratio":36,"flashsale_info":[],"sales":0};
const saveType = "amount";
const productLabelDiscountOn = true;
const map = {
B: ``,
C: ``,
A: `
${saveType == 'percentage'
? `-${variantData.off_ratio}%`
: `-`
}
`
}
const price_group_arr = ["B","C","A"];
const price_str_arr = price_group_arr.map(type => map[type]);
return `
-
${price_str_arr.join('')}
`;
}()}
${function(){
const tipText = "Please select a {{ name }}".replace(/\{\{\s+name\s+\}\}/g, data);
return `${tipText}
`
}()}
Product was out of stock.
Product does not exist
${function() {
const minDays = parseInt('3');
const maxDays = parseInt('7');
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 `
${tipText}
`;
}()}