Creative Crystal Wall Light
${function() {
const variantData = data.variant || {"id":"7b750d16-4a62-487c-a507-2282755a0fde","product_id":"db89ccd7-ff58-4142-8e09-fbba822b643f","title":"Black","weight_unit":"kg","inventory_quantity":9999,"sku":"EM1046372-Black-A00334875","barcode":"104637201","position":1,"option1":"Black","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/1e85fea39edf1d3edbcc21edc13e93d8.jpeg","path":"1e85fea39edf1d3edbcc21edc13e93d8.jpeg","width":750,"height":750,"alt":"Creative Crystal Wall Light","aspect_ratio":1},"wholesale_price":[{"price":299,"min_quantity":1}],"weight":"2.2","compare_at_price":"499","price":"299","retail_price":"499","available":true,"url":"\/products\/creative-crystal-wall-light?variant=7b750d16-4a62-487c-a507-2282755a0fde","available_quantity":999999999,"options":[{"name":"Color","value":"Black"}],"off_ratio":40,"flashsale_info":[],"sales":2};
const saveType = "percentage";
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('')}
`;
}()}
Color:
Black
${function(){
const optName = "Color";
const optionValue = data.originData.selectData ? data.originData.selectData[optName].value : data.originData.value;
const optionValueText = optionValue ? (optionValue) : '';
return `${optionValueText} `;
}()}
${function(){
const tipText = "Please select a {{ name }}".replace(/\{\{\s+name\s+\}\}/g, data);
return `${tipText}
`
}()}
ADD TO CART
Product was out of stock.
Product does not exist
${function() {
const minDays = parseInt('7');
const maxDays = parseInt('12');
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}
`;
}()}