Kugoo Scooter Brake Line for M4 & M4 Pro/G-Booster/G-Max/G2 Pro/G1 an other kugoo scooter models
${function() {
const variantData = data.variant || {"id":"734b3512-6ffe-42d4-97c3-3ce0379082ce","product_id":"20f418ff-4976-4814-8811-a2c89de2a59c","title":"M2 Pro","weight_unit":"kg","inventory_quantity":100,"sku":"M2 Pro-\u5239\u8f66\u7ebf","barcode":"","position":1,"option1":"M2 Pro","option2":"","option3":"","note":"","image":null,"wholesale_price":[{"price":24,"min_quantity":1}],"weight":"0","compare_at_price":"40","price":"24","retail_price":"40","available":true,"url":"\/products\/kugoo-scooter-brake-line-for-m4-m4-prog-boosterg-maxg2-prog1-an-other-kugoo-scooter-models?variant=734b3512-6ffe-42d4-97c3-3ce0379082ce","available_quantity":999999999,"options":[{"name":"style","value":"M2 Pro"}],"off_ratio":40,"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}
`;
}()}