Yellow Duck Scooter Pendant
${function() {
const variantData = data.variant || {"id":"31cf890e-17a7-4ab6-9af4-c472affd9eb3","product_id":"48929f6d-c0d6-487b-9565-e4b1ccd9d327","title":"1","weight_unit":"kg","inventory_quantity":99,"sku":"\u5c0f\u9ec4\u9e2d-1","barcode":"","position":1,"option1":"1","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/da0d866df12851cfb589f2c34f151b57.png","path":"da0d866df12851cfb589f2c34f151b57.png","width":800,"height":800,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":35,"min_quantity":1}],"weight":"0","compare_at_price":"45","price":"35","retail_price":"45","available":true,"url":"\/products\/yellow-duck-scooter-pendant?variant=31cf890e-17a7-4ab6-9af4-c472affd9eb3","available_quantity":99,"options":[{"name":"Color","value":"1"}],"off_ratio":22,"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}
`;
}()}