Kugou M4 and M4 Pro front shock absorber
${function() {
const variantData = data.variant || {"id":"061b5159-e6ff-4431-aec9-8f66424ec3b4","product_id":"7ff8e51b-f110-42f7-bf3d-b3adb6c327b2","title":"M4 and M4 Pro front shock absorber","weight_unit":"kg","inventory_quantity":97,"sku":"M4 & M4 Pro-\u524d\u51cf\u9707","barcode":"","position":1,"option1":"M4 and M4 Pro front shock absorber","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/a1ddb21b26c817f47b0e8e5f213c762d.png","path":"a1ddb21b26c817f47b0e8e5f213c762d.png","width":1200,"height":800,"alt":"","aspect_ratio":1.5},"wholesale_price":[{"price":47,"min_quantity":1}],"weight":"0","compare_at_price":"55","price":"47","retail_price":"55","available":true,"url":"\/products\/kugou-m4-and-m4-pro-front-shock-absorber?variant=061b5159-e6ff-4431-aec9-8f66424ec3b4","available_quantity":999999999,"options":[{"name":"style","value":"M4 and M4 Pro front shock absorber"}],"off_ratio":15,"flashsale_info":[],"sales":1};
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}
`;
}()}