Smart Toothbrush Holder
${function() {
const variantData = data.variant || {"id":"994bac16-d34d-4ca9-b7ea-683684e9013d","product_id":"92a8b63b-c253-4f70-9161-c06eecbe907a","title":"2 Cup Gray","weight_unit":"kg","inventory_quantity":1000,"sku":"25c118e4-9d2b-4703-a5ac-83a4add65ab5","barcode":"313093513587","position":1,"option1":"2 Cup Gray","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/d5870b26bf4cecfa4b9949ee290081b9.jpeg","path":"d5870b26bf4cecfa4b9949ee290081b9.jpeg","width":798,"height":796,"alt":"","aspect_ratio":1.0025125628140703},"wholesale_price":[{"price":30.99,"min_quantity":1}],"weight":"0","compare_at_price":"62.99","price":"30.99","retail_price":"62.99","available":true,"url":"\/products\/smart-toothbrush-holder-1?variant=994bac16-d34d-4ca9-b7ea-683684e9013d","available_quantity":999999999,"options":[{"name":"Color","value":"2 Cup Gray"}],"off_ratio":51,"flashsale_info":[],"sales":0};
const saveType = "amount";
const productLabelDiscountOn = true;
return `
-
${saveType == 'percentage'
? `-${variantData.off_ratio}%`
: `- `
}
`;
}()}
Color:
2 Cup Gray
${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
$30.99
${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":"994bac16-d34d-4ca9-b7ea-683684e9013d","product_id":"92a8b63b-c253-4f70-9161-c06eecbe907a","title":"2 Cup Gray","weight_unit":"kg","inventory_quantity":1000,"sku":"25c118e4-9d2b-4703-a5ac-83a4add65ab5","barcode":"313093513587","position":1,"option1":"2 Cup Gray","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/d5870b26bf4cecfa4b9949ee290081b9.jpeg","path":"d5870b26bf4cecfa4b9949ee290081b9.jpeg","width":798,"height":796,"alt":"","aspect_ratio":1.0025125628140703},"wholesale_price":[{"price":30.99,"min_quantity":1}],"weight":"0","compare_at_price":"62.99","price":"30.99","retail_price":"62.99","available":true,"url":"\/products\/smart-toothbrush-holder-1?variant=994bac16-d34d-4ca9-b7ea-683684e9013d","available_quantity":999999999,"options":[{"name":"Color","value":"2 Cup Gray"}],"off_ratio":51,"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.
Sku : 25c118e4-9d2b-4703-a5ac-83a4add65ab5
Barcode : 313093513587
${function(){
const variantData = data.variant || {"id":"994bac16-d34d-4ca9-b7ea-683684e9013d","product_id":"92a8b63b-c253-4f70-9161-c06eecbe907a","title":"2 Cup Gray","weight_unit":"kg","inventory_quantity":1000,"sku":"25c118e4-9d2b-4703-a5ac-83a4add65ab5","barcode":"313093513587","position":1,"option1":"2 Cup Gray","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/d5870b26bf4cecfa4b9949ee290081b9.jpeg","path":"d5870b26bf4cecfa4b9949ee290081b9.jpeg","width":798,"height":796,"alt":"","aspect_ratio":1.0025125628140703},"wholesale_price":[{"price":30.99,"min_quantity":1}],"weight":"0","compare_at_price":"62.99","price":"30.99","retail_price":"62.99","available":true,"url":"\/products\/smart-toothbrush-holder-1?variant=994bac16-d34d-4ca9-b7ea-683684e9013d","available_quantity":999999999,"options":[{"name":"Color","value":"2 Cup Gray"}],"off_ratio":51,"flashsale_info":[],"sales":0};
return `
Sku : ${variantData && variantData.sku}
Weight : ${variantData && variantData.weight}${variantData && variantData.weight_unit}
Barcode : ${variantData && variantData.barcode}
`
}()}