Battery lock core and key
Delivery within 7-15 working days
${function() {
const variantData = data.variant || {"id":"869e9ad4-3cf9-438e-8e28-1a43e2277cd5","product_id":"10611aff-7f90-4f03-b621-ae84417ed93b","title":"LO26-IT","weight_unit":"kg","inventory_quantity":0,"sku":"LO26\u7535\u6c60\u9501\u82af\u53ca\u94a5\u5319","barcode":"","position":1,"option1":"LO26-IT","option2":"","option3":"","note":"","image":null,"wholesale_price":[{"price":29,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"29","retail_price":"0","available":true,"url":"\/products\/battery-lock-core-and-key?variant=869e9ad4-3cf9-438e-8e28-1a43e2277cd5","available_quantity":999999999,"options":[{"name":"Model","value":"LO26-IT"}],"off_ratio":0,"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}
`;
}()}