Kugoo S3 & S3 Pro Front Fork and Rear Fork
${function() {
const variantData = data.variant || {"id":"dc52f1f7-f04b-4e18-8823-6ae63cdf51f4","product_id":"b8337b82-69ca-436f-8a7b-adc47d63aa9d","title":"Rear Fork","weight_unit":"kg","inventory_quantity":100,"sku":"\u540e\u53c9-S3 & S3 Pro","barcode":"","position":1,"option1":"Rear Fork","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/eb8091cf96511ff3eba14c229dc4288d.jpeg","path":"eb8091cf96511ff3eba14c229dc4288d.jpeg","width":4608,"height":3456,"alt":"","aspect_ratio":1.3333333333333333},"wholesale_price":[{"price":33,"min_quantity":1}],"weight":"0","compare_at_price":"40","price":"33","retail_price":"40","available":true,"url":"\/products\/kugoo-s3-s3-pro-front-fork-and-rear-fork?variant=dc52f1f7-f04b-4e18-8823-6ae63cdf51f4","available_quantity":999999999,"options":[{"name":"style","value":"Rear Fork"}],"off_ratio":18,"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}
`;
}()}