Single-Sale The Ancient City Set
${function() {
const variantData = data.variant || {"id":"1d536825-9de5-43a3-bc7a-90117ccedf0b","product_id":"37d621d0-d761-467f-bf85-efc214537829","title":"city wall","weight_unit":"g","inventory_quantity":999,"sku":"\u53e4\u57ce\u57ce\u5899\/\u5957","barcode":"","position":1,"option1":"city wall","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/066ef1bda3528d4395a757c317df1ee9.jpeg","path":"066ef1bda3528d4395a757c317df1ee9.jpeg","width":800,"height":800,"alt":"Single-Sale The Ancient City Set rebuildvenus","aspect_ratio":1},"wholesale_price":[{"price":6,"min_quantity":1}],"weight":"128","compare_at_price":"6","price":"6","retail_price":"6","available":true,"url":"\/products\/single-sale-the-ancient-city-set?variant=1d536825-9de5-43a3-bc7a-90117ccedf0b","available_quantity":999,"options":[{"name":"SKU","value":"city wall"}],"off_ratio":0,"flashsale_info":[],"sales":0};
const saveType = "percentage";
const productLabelDiscountOn = true;
return `
-
${saveType == 'percentage'
? `-${variantData.off_ratio}%`
: `-`
}
`;
}()}
${function(){
const tipText = "Please select a {{ name }}".replace(/\{\{\s+name\s+\}\}/g, data);
return `${tipText}
`
}()}
Product was out of stock.
Product is unavailable.
${function() {
const minDays = parseInt('7');
const maxDays = parseInt('30');
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}
`;
}()}
${function() {
const postageFreeAmount = 15;
const custom_text = "orders containing minifigures require a minimum of {amount}.";
const totalPrice = +data.total_price;
const diffPrice = postageFreeAmount - totalPrice;
const percentDiff = (diffPrice > 0 ? (totalPrice / postageFreeAmount * 100) : 100) + '%';
let tipText = "Your order is free delivery";
if (diffPrice > 0) {
tipText = custom_text.replace('{amount}', `
`);
}
return `
`;
}()}