people are viewing this right now
Buy now
${function() {
let { prices } = data.data
const total_price = (prices && prices.total_price) || 0;
const subtotal_price = (prices && prices.subtotal_price) || 0;
return `
`
}()}
Product was out of stock.
Sku : CL1-0412-black
Weight : 0.5kg
${function(){
const variantData = data.variant || {"id":"768eb9d2-5ba1-4bdb-a567-b04eb8891ede","product_id":"745d106c-534d-4dc5-9dd6-46fd9fc2457d","title":"Black","weight_unit":"kg","inventory_quantity":6,"sku":"CL1-0412-black","barcode":"","position":1,"option1":"Black","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/c8b8cdbadb1c2f1b4843e6f1a263fea7.jpg","path":"c8b8cdbadb1c2f1b4843e6f1a263fea7.jpg","width":1000,"height":1000,"alt":"1-4x37 Dual Role Optical Sight--rail:21.2mm - HaikeWargame","aspect_ratio":1},"wholesale_price":[{"price":179,"min_quantity":1}],"weight":"0.5","compare_at_price":"299","price":"179","retail_price":"299","available":true,"url":"\/products\/1-4x37-dual-role-optical-sight-5-56-ballistic-reticle-with-anti-reflection-device?variant=768eb9d2-5ba1-4bdb-a567-b04eb8891ede","available_quantity":999999999,"options":[{"name":"Color","value":"Black"}],"off_ratio":40,"flashsale_info":[],"sales":0};
return `
Sku : ${variantData && variantData.sku}
Weight : ${variantData && variantData.weight}${variantData && variantData.weight_unit}
Barcode : ${variantData && variantData.barcode}
`
}()}
${function() {
const postageFreeAmount = 499;
const custom_text = "Buy {amount} more to enjoy FREE Shipping";
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 `
`;
}()}
${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 `
`;
}()}