magvike-TMLED Cute Night Light
${function() {
const variantData = data.variant || {"id":"7a13b2f3-98e2-47ec-b411-d7bb11ef65d8","product_id":"6d010d10-289b-4e19-8657-805bd5a9d180","title":"PINK-DOG","weight_unit":"kg","inventory_quantity":9999,"sku":"NB1571284-\u7c89\u8272-\u5c0f\u72d7","barcode":"","position":1,"option1":"PINK","option2":"DOG","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/81168e87c1ed18c44e0a0842b65d724a.jpeg","path":"81168e87c1ed18c44e0a0842b65d724a.jpeg","width":800,"height":800,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":23.69,"min_quantity":1}],"weight":"0","compare_at_price":"46.88","price":"23.69","retail_price":"46.88","available":true,"url":"\/products\/led-cute-night-light-7?variant=7a13b2f3-98e2-47ec-b411-d7bb11ef65d8","available_quantity":999999999,"options":[{"name":"Color","value":"PINK"},{"name":"Style","value":"DOG"}],"off_ratio":49,"flashsale_info":[],"sales":0};
const saveType = "amount";
const productLabelDiscountOn = true;
return `
-
${saveType == 'percentage'
? `-${variantData.off_ratio}% `
: `- `
}
`;
}()}
Color:
PINK
${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}
`
}()}
Style:
DOG
${function(){
const optName = "Style";
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
$23.69
${function(){
const wholesale_enabled = false;
const qty = data.quantity || 1;
const currentSelectVariant = data.variant;
const defaultVariant = (data.product && data.product.variants && data.product.variants[0]);
const productVariant = {"id":"7a13b2f3-98e2-47ec-b411-d7bb11ef65d8","product_id":"6d010d10-289b-4e19-8657-805bd5a9d180","title":"PINK-DOG","weight_unit":"kg","inventory_quantity":9999,"sku":"NB1571284-\u7c89\u8272-\u5c0f\u72d7","barcode":"","position":1,"option1":"PINK","option2":"DOG","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/81168e87c1ed18c44e0a0842b65d724a.jpeg","path":"81168e87c1ed18c44e0a0842b65d724a.jpeg","width":800,"height":800,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":23.69,"min_quantity":1}],"weight":"0","compare_at_price":"46.88","price":"23.69","retail_price":"46.88","available":true,"url":"\/products\/led-cute-night-light-7?variant=7a13b2f3-98e2-47ec-b411-d7bb11ef65d8","available_quantity":999999999,"options":[{"name":"Color","value":"PINK"},{"name":"Style","value":"DOG"}],"off_ratio":49,"flashsale_info":[],"sales":0};
const variantData = currentSelectVariant || defaultVariant || productVariant;
const wholesale_price = variantData.wholesale_price || [];
if(wholesale_enabled && wholesale_price.length > 0) {
let wholesaleIndex = wholesale_price.findIndex(item => {
return item.min_quantity > qty;
});
if(wholesaleIndex < 0){
wholesaleIndex = wholesale_price.length - 1;
}else if(wholesaleIndex > 0){
wholesaleIndex = wholesaleIndex - 1;
}
const wholesalePrice = wholesale_price[wholesaleIndex] || '';
return `
`
}else {
const price = variantData && variantData.price;
return price != undefined ? `
` : ' ';
}
}()}
Buy now
Product was out of stock.
Product is unavailable.
${function(){
const variantData = data.variant || {"id":"7a13b2f3-98e2-47ec-b411-d7bb11ef65d8","product_id":"6d010d10-289b-4e19-8657-805bd5a9d180","title":"PINK-DOG","weight_unit":"kg","inventory_quantity":9999,"sku":"NB1571284-\u7c89\u8272-\u5c0f\u72d7","barcode":"","position":1,"option1":"PINK","option2":"DOG","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/81168e87c1ed18c44e0a0842b65d724a.jpeg","path":"81168e87c1ed18c44e0a0842b65d724a.jpeg","width":800,"height":800,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":23.69,"min_quantity":1}],"weight":"0","compare_at_price":"46.88","price":"23.69","retail_price":"46.88","available":true,"url":"\/products\/led-cute-night-light-7?variant=7a13b2f3-98e2-47ec-b411-d7bb11ef65d8","available_quantity":999999999,"options":[{"name":"Color","value":"PINK"},{"name":"Style","value":"DOG"}],"off_ratio":49,"flashsale_info":[],"sales":0};
return `
Sku : ${variantData && variantData.sku}
Weight : ${variantData && variantData.weight}${variantData && variantData.weight_unit}
Barcode : ${variantData && variantData.barcode}
`
}()}