${function() {
const variantData = data.variant || {"id":"78e59e6d-4422-44a4-a04a-cf5c163fed6c","product_id":"092a0302-5190-42e0-8a7b-e4bd1939f291","title":"Style-1-White-One Size","weight_unit":"kg","inventory_quantity":100,"sku":"mug031-#DYZ6GWCPcEzG4c29U","barcode":"","position":1,"option1":"Style-1","option2":"White","option3":"One Size","note":"","image":{"src":"\/\/img.staticdj.com\/083eaa57c3ee897575f763f94fda1e3b.jpeg","path":"083eaa57c3ee897575f763f94fda1e3b.jpeg","width":1200,"height":1200,"alt":"Pumpkin Kisses Harvest Wishes Mug","aspect_ratio":1},"wholesale_price":[{"price":24.99,"min_quantity":1}],"weight":"0","compare_at_price":"35.99","price":"24.99","retail_price":"35.99","available":true,"url":"\/products\/pumpkin-kisses-harvest-wishes-mug?variant=78e59e6d-4422-44a4-a04a-cf5c163fed6c","available_quantity":100,"options":[{"name":"Product","value":"Style-1"},{"name":"Color","value":"White"},{"name":"Size","value":"One Size"}],"off_ratio":31,"flashsale_info":[],"sales":0};
const saveType = "percentage";
const saveText = "Save {{saved_amount}}";
const productLabelDiscountOn = true;
return `
-
${saveText.replace('\{\{saved_amount\}\}',
saveType == 'percentage'
? variantData.off_ratio + '%'
: ` `
)}
`;
}()}
Product
: Style-1
${function(){
const optName = "Product";
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}
`
}()}
Color
: White
${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}
`
}()}
Size
: One Size
${function(){
const optName = "Size";
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
$24.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":"78e59e6d-4422-44a4-a04a-cf5c163fed6c","product_id":"092a0302-5190-42e0-8a7b-e4bd1939f291","title":"Style-1-White-One Size","weight_unit":"kg","inventory_quantity":100,"sku":"mug031-#DYZ6GWCPcEzG4c29U","barcode":"","position":1,"option1":"Style-1","option2":"White","option3":"One Size","note":"","image":{"src":"\/\/img.staticdj.com\/083eaa57c3ee897575f763f94fda1e3b.jpeg","path":"083eaa57c3ee897575f763f94fda1e3b.jpeg","width":1200,"height":1200,"alt":"Pumpkin Kisses Harvest Wishes Mug","aspect_ratio":1},"wholesale_price":[{"price":24.99,"min_quantity":1}],"weight":"0","compare_at_price":"35.99","price":"24.99","retail_price":"35.99","available":true,"url":"\/products\/pumpkin-kisses-harvest-wishes-mug?variant=78e59e6d-4422-44a4-a04a-cf5c163fed6c","available_quantity":100,"options":[{"name":"Product","value":"Style-1"},{"name":"Color","value":"White"},{"name":"Size","value":"One Size"}],"off_ratio":31,"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 : mug031-#DYZ6GWCPcEzG4c29U
${function(){
const variantData = data.variant || {"id":"78e59e6d-4422-44a4-a04a-cf5c163fed6c","product_id":"092a0302-5190-42e0-8a7b-e4bd1939f291","title":"Style-1-White-One Size","weight_unit":"kg","inventory_quantity":100,"sku":"mug031-#DYZ6GWCPcEzG4c29U","barcode":"","position":1,"option1":"Style-1","option2":"White","option3":"One Size","note":"","image":{"src":"\/\/img.staticdj.com\/083eaa57c3ee897575f763f94fda1e3b.jpeg","path":"083eaa57c3ee897575f763f94fda1e3b.jpeg","width":1200,"height":1200,"alt":"Pumpkin Kisses Harvest Wishes Mug","aspect_ratio":1},"wholesale_price":[{"price":24.99,"min_quantity":1}],"weight":"0","compare_at_price":"35.99","price":"24.99","retail_price":"35.99","available":true,"url":"\/products\/pumpkin-kisses-harvest-wishes-mug?variant=78e59e6d-4422-44a4-a04a-cf5c163fed6c","available_quantity":100,"options":[{"name":"Product","value":"Style-1"},{"name":"Color","value":"White"},{"name":"Size","value":"One Size"}],"off_ratio":31,"flashsale_info":[],"sales":0};
return `
Sku : ${variantData && variantData.sku}
Weight : ${variantData && variantData.weight}${variantData && variantData.weight_unit}
Barcode : ${variantData && variantData.barcode}
`
}()}