${function() {
const variantData = data.variant || {"id":"0f3aea2e-e38c-442e-b154-895aa5118c9c","product_id":"60fd7d65-3b92-43d1-a301-f93fd8a67492","title":"S-grey","weight_unit":"kg","inventory_quantity":1000,"sku":"S grey-7535508","barcode":"","position":1,"option1":"S","option2":"grey","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/9f6d7f9c46b9cc4ee7601ebd9a3c8502.jpeg","path":"9f6d7f9c46b9cc4ee7601ebd9a3c8502.jpeg","width":800,"height":1000,"alt":"Sexy Knitted Sweater Long Sleeve V Neck Cashmere Tops","aspect_ratio":0.8},"wholesale_price":[{"price":24.95,"min_quantity":1}],"weight":"0","compare_at_price":"24.95","price":"24.95","retail_price":"24.95","available":true,"url":"\/products\/sexy-knitted-sweater-long-sleeve-v-neck-cashmere-tops-208529889342?variant=0f3aea2e-e38c-442e-b154-895aa5118c9c","available_quantity":999999999,"options":[{"name":"Size","value":"S"},{"name":"Color","value":"grey"}],"off_ratio":0,"flashsale_info":[],"sales":0};
const saveType = "amount";
const saveText = "Save {{saved_amount}}";
const productLabelDiscountOn = true;
return `
-
${saveText.replace('\{\{saved_amount\}\}',
saveType == 'percentage'
? variantData.off_ratio + '%'
: ` `
)}
`;
}()}
Size
: S
${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}
`
}()}
Color
: grey
${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
$24.95
${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":"0f3aea2e-e38c-442e-b154-895aa5118c9c","product_id":"60fd7d65-3b92-43d1-a301-f93fd8a67492","title":"S-grey","weight_unit":"kg","inventory_quantity":1000,"sku":"S grey-7535508","barcode":"","position":1,"option1":"S","option2":"grey","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/9f6d7f9c46b9cc4ee7601ebd9a3c8502.jpeg","path":"9f6d7f9c46b9cc4ee7601ebd9a3c8502.jpeg","width":800,"height":1000,"alt":"Sexy Knitted Sweater Long Sleeve V Neck Cashmere Tops","aspect_ratio":0.8},"wholesale_price":[{"price":24.95,"min_quantity":1}],"weight":"0","compare_at_price":"24.95","price":"24.95","retail_price":"24.95","available":true,"url":"\/products\/sexy-knitted-sweater-long-sleeve-v-neck-cashmere-tops-208529889342?variant=0f3aea2e-e38c-442e-b154-895aa5118c9c","available_quantity":999999999,"options":[{"name":"Size","value":"S"},{"name":"Color","value":"grey"}],"off_ratio":0,"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":"0f3aea2e-e38c-442e-b154-895aa5118c9c","product_id":"60fd7d65-3b92-43d1-a301-f93fd8a67492","title":"S-grey","weight_unit":"kg","inventory_quantity":1000,"sku":"S grey-7535508","barcode":"","position":1,"option1":"S","option2":"grey","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/9f6d7f9c46b9cc4ee7601ebd9a3c8502.jpeg","path":"9f6d7f9c46b9cc4ee7601ebd9a3c8502.jpeg","width":800,"height":1000,"alt":"Sexy Knitted Sweater Long Sleeve V Neck Cashmere Tops","aspect_ratio":0.8},"wholesale_price":[{"price":24.95,"min_quantity":1}],"weight":"0","compare_at_price":"24.95","price":"24.95","retail_price":"24.95","available":true,"url":"\/products\/sexy-knitted-sweater-long-sleeve-v-neck-cashmere-tops-208529889342?variant=0f3aea2e-e38c-442e-b154-895aa5118c9c","available_quantity":999999999,"options":[{"name":"Size","value":"S"},{"name":"Color","value":"grey"}],"off_ratio":0,"flashsale_info":[],"sales":0};
return `
Sku : ${variantData && variantData.sku}
Weight : ${variantData && variantData.weight}${variantData && variantData.weight_unit}
Barcode : ${variantData && variantData.barcode}
`
}()}