KugooKirin V1 (B2) charging port
${function() {
const variantData = data.variant || {"id":"bb2a8730-e663-49a1-945e-c72675089e85","product_id":"90545bf6-f54d-4447-bf3d-0a41a89c8d8f","title":"V1 (B2) charging port","weight_unit":"kg","inventory_quantity":88,"sku":"V1\uff08B2\uff09\u5145\u7535\u63a5\u53e3","barcode":"","position":1,"option1":"V1 (B2) charging port","option2":"","option3":"","note":"","image":null,"wholesale_price":[{"price":26,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"26","retail_price":"0","available":true,"url":"\/products\/kugookirin-v1-b2-charging-port?variant=bb2a8730-e663-49a1-945e-c72675089e85","available_quantity":88,"options":[{"name":"style","value":"V1 (B2) charging port"}],"off_ratio":0,"flashsale_info":[],"sales":11};
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}
`;
}()}