${function() {
const variantData = data.variant || {"id":"499fd654-3466-4100-9b92-edaeae360315","product_id":"f9e5708b-1bcc-4a5f-856b-a97ff34cf49d","title":"Original","weight_unit":"lb","inventory_quantity":42,"sku":"65992","barcode":"039278040104","position":1,"option1":"Original","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/e26c93bd0e3d1f8df8e1868cb2d232ac.jpeg","path":"e26c93bd0e3d1f8df8e1868cb2d232ac.jpeg","width":3000,"height":3000,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":4.99,"min_quantity":1}],"weight":"0.5","compare_at_price":"4.99","price":"3.99","retail_price":"4.99","available":true,"url":"\/products\/ginger-honey-crystals-instant-tea?variant=499fd654-3466-4100-9b92-edaeae360315","available_quantity":42,"options":[{"name":"Flavor","value":"Original"}],"off_ratio":"20","flashsale_info":{"variant_id":"499fd654-3466-4100-9b92-edaeae360315","product_id":"","quantity":0,"discount_id":"cfe24e1f-8b7b-47bf-9d3a-af5ad9144d26","limit_time":2192747,"limit_buy":-1,"user_limit_buy":-1,"discount_sales":1,"discount_sales_rate":"2","discount_stock":42,"ends_at":1719406799,"starts_at":1717074000,"allow_oversold":"uncheck","allocation_method":"none","price":"4.99","compare_at_price":"4.99","discount_price":"3.99","customary_saved_price":"0","customary_off_ratio":"0","discount_saved_price":"1","discount_off_ratio":"20","use_before_price":false,"before_price":"","title":"","properties":"","color_setting_promotional_copy":"","discount_quantity":0,"is_need_split":false},"sales":33};
const saveType = "amount";
const saveText = "Save {{saved_amount}}";
const productLabelDiscountOn = true;
return `
-
${saveText.replace('\{\{saved_amount\}\}',
saveType == 'percentage'
? variantData.off_ratio + '%'
: ` `
)}
`;
}()}
${function(){
const variantData = data.variant || {"id":"499fd654-3466-4100-9b92-edaeae360315","product_id":"f9e5708b-1bcc-4a5f-856b-a97ff34cf49d","title":"Original","weight_unit":"lb","inventory_quantity":42,"sku":"65992","barcode":"039278040104","position":1,"option1":"Original","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/e26c93bd0e3d1f8df8e1868cb2d232ac.jpeg","path":"e26c93bd0e3d1f8df8e1868cb2d232ac.jpeg","width":3000,"height":3000,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":4.99,"min_quantity":1}],"weight":"0.5","compare_at_price":"4.99","price":"3.99","retail_price":"4.99","available":true,"url":"\/products\/ginger-honey-crystals-instant-tea?variant=499fd654-3466-4100-9b92-edaeae360315","available_quantity":42,"options":[{"name":"Flavor","value":"Original"}],"off_ratio":"20","flashsale_info":{"variant_id":"499fd654-3466-4100-9b92-edaeae360315","product_id":"","quantity":0,"discount_id":"cfe24e1f-8b7b-47bf-9d3a-af5ad9144d26","limit_time":2192747,"limit_buy":-1,"user_limit_buy":-1,"discount_sales":1,"discount_sales_rate":"2","discount_stock":42,"ends_at":1719406799,"starts_at":1717074000,"allow_oversold":"uncheck","allocation_method":"none","price":"4.99","compare_at_price":"4.99","discount_price":"3.99","customary_saved_price":"0","customary_off_ratio":"0","discount_saved_price":"1","discount_off_ratio":"20","use_before_price":false,"before_price":"","title":"","properties":"","color_setting_promotional_copy":"","discount_quantity":0,"is_need_split":false},"sales":33};
return `
Sku:
${variantData && variantData.sku}
`
}()}
Flavor
: Original
${function(){
const optName = "Flavor";
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
$3.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":"499fd654-3466-4100-9b92-edaeae360315","product_id":"f9e5708b-1bcc-4a5f-856b-a97ff34cf49d","title":"Original","weight_unit":"lb","inventory_quantity":42,"sku":"65992","barcode":"039278040104","position":1,"option1":"Original","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/e26c93bd0e3d1f8df8e1868cb2d232ac.jpeg","path":"e26c93bd0e3d1f8df8e1868cb2d232ac.jpeg","width":3000,"height":3000,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":4.99,"min_quantity":1}],"weight":"0.5","compare_at_price":"4.99","price":"3.99","retail_price":"4.99","available":true,"url":"\/products\/ginger-honey-crystals-instant-tea?variant=499fd654-3466-4100-9b92-edaeae360315","available_quantity":42,"options":[{"name":"Flavor","value":"Original"}],"off_ratio":"20","flashsale_info":{"variant_id":"499fd654-3466-4100-9b92-edaeae360315","product_id":"","quantity":0,"discount_id":"cfe24e1f-8b7b-47bf-9d3a-af5ad9144d26","limit_time":2192747,"limit_buy":-1,"user_limit_buy":-1,"discount_sales":1,"discount_sales_rate":"2","discount_stock":42,"ends_at":1719406799,"starts_at":1717074000,"allow_oversold":"uncheck","allocation_method":"none","price":"4.99","compare_at_price":"4.99","discount_price":"3.99","customary_saved_price":"0","customary_off_ratio":"0","discount_saved_price":"1","discount_off_ratio":"20","use_before_price":false,"before_price":"","title":"","properties":"","color_setting_promotional_copy":"","discount_quantity":0,"is_need_split":false},"sales":33};
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.