${function() {
const variantData = data.variant || {"id":"d64e1549-7fcc-4b71-9ade-97735c87cd41","product_id":"04b3a05a-5aa2-4e27-8289-b369ec4799c6","title":"style A-back cover(1 pc)","weight_unit":"kg","inventory_quantity":987,"sku":"OV1329792-S","barcode":"","position":1,"option1":"style A","option2":"back cover(1 pc)","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/826866980ad6d7ab1dc2ae52899d1806.jpeg","path":"826866980ad6d7ab1dc2ae52899d1806.jpeg","width":700,"height":700,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":19.99,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"19.99","retail_price":"0","available":true,"url":"\/products\/2022-new-wear-resistant-universal-sofa-covere63a55af-a04b-41aa-896a-533ece264f98374232a2-9178-4acf-b3d6-b39e86c145ba?variant=d64e1549-7fcc-4b71-9ade-97735c87cd41","available_quantity":999999999,"options":[{"name":"COLOR STYLEs","value":"style A"},{"name":"SIZE","value":"back cover(1 pc)"}],"off_ratio":0,"flashsale_info":[],"sales":4};
const saveType = "amount";
const saveText = "Save {{saved_amount}}";
const productLabelDiscountOn = true;
return `
-
${saveText.replace('\{\{saved_amount\}\}',
saveType == 'percentage'
? variantData.off_ratio + '%'
: ` `
)}
`;
}()}
Color Styles
: style A
${function(){
const optName = "COLOR STYLEs";
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
: back cover(1 pc)
${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
$19.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":"d64e1549-7fcc-4b71-9ade-97735c87cd41","product_id":"04b3a05a-5aa2-4e27-8289-b369ec4799c6","title":"style A-back cover(1 pc)","weight_unit":"kg","inventory_quantity":987,"sku":"OV1329792-S","barcode":"","position":1,"option1":"style A","option2":"back cover(1 pc)","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/826866980ad6d7ab1dc2ae52899d1806.jpeg","path":"826866980ad6d7ab1dc2ae52899d1806.jpeg","width":700,"height":700,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":19.99,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"19.99","retail_price":"0","available":true,"url":"\/products\/2022-new-wear-resistant-universal-sofa-covere63a55af-a04b-41aa-896a-533ece264f98374232a2-9178-4acf-b3d6-b39e86c145ba?variant=d64e1549-7fcc-4b71-9ade-97735c87cd41","available_quantity":999999999,"options":[{"name":"COLOR STYLEs","value":"style A"},{"name":"SIZE","value":"back cover(1 pc)"}],"off_ratio":0,"flashsale_info":[],"sales":4};
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":"d64e1549-7fcc-4b71-9ade-97735c87cd41","product_id":"04b3a05a-5aa2-4e27-8289-b369ec4799c6","title":"style A-back cover(1 pc)","weight_unit":"kg","inventory_quantity":987,"sku":"OV1329792-S","barcode":"","position":1,"option1":"style A","option2":"back cover(1 pc)","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/826866980ad6d7ab1dc2ae52899d1806.jpeg","path":"826866980ad6d7ab1dc2ae52899d1806.jpeg","width":700,"height":700,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":19.99,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"19.99","retail_price":"0","available":true,"url":"\/products\/2022-new-wear-resistant-universal-sofa-covere63a55af-a04b-41aa-896a-533ece264f98374232a2-9178-4acf-b3d6-b39e86c145ba?variant=d64e1549-7fcc-4b71-9ade-97735c87cd41","available_quantity":999999999,"options":[{"name":"COLOR STYLEs","value":"style A"},{"name":"SIZE","value":"back cover(1 pc)"}],"off_ratio":0,"flashsale_info":[],"sales":4};
return `
Weight : ${variantData && variantData.weight}${variantData && variantData.weight_unit}
Barcode : ${variantData && variantData.barcode}
`
}()}
people are viewing this right now