Yard Bars - The Storehouse by Taverns-To-Go 10 x 10
${function() {
const variantData = data.variant || {"id":"ed506f22-6807-425d-9798-fcd7391c7d92","product_id":"c756814e-c6bb-4919-98ea-d3c4608b3716","title":"Bar entry on LHS","weight_unit":"kg","inventory_quantity":1000,"sku":"sku2118839280441","barcode":"","position":1,"option1":"Bar entry on LHS","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/1c68d859b76b457b7c0c40fa13c9cf22.jpeg","path":"1c68d859b76b457b7c0c40fa13c9cf22.jpeg","width":794,"height":794,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":11.22,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"11.22","retail_price":"0","available":true,"url":"\/products\/yard-bars-the-storehouse-by-taverns-to-1429724011?variant=ed506f22-6807-425d-9798-fcd7391c7d92","available_quantity":1000,"options":[{"name":"Configuration","value":"Bar entry on LHS"}],"off_ratio":0,"flashsale_info":[],"sales":0};
const saveType = "percentage";
const productLabelDiscountOn = true;
return `
-
${saveType == 'percentage'
? `-${variantData.off_ratio}% `
: `- `
}
`;
}()}
${function() {
const minInventory = parseInt('3');
const maxInventory = parseInt('88');
const randomInventory = Math.round(Math.random() * (maxInventory - minInventory)) + minInventory;
const customText = "Only {stock} item(s) left in stock!".replace(/\{stock\}/g, '' + randomInventory + ' ');
const barWidth = (randomInventory / maxInventory) * 100 + '%';
return `
`;
}()}
Configuration:
Bar entry on LHS
${function(){
const optName = "Configuration";
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
$11.22
${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":"ed506f22-6807-425d-9798-fcd7391c7d92","product_id":"c756814e-c6bb-4919-98ea-d3c4608b3716","title":"Bar entry on LHS","weight_unit":"kg","inventory_quantity":1000,"sku":"sku2118839280441","barcode":"","position":1,"option1":"Bar entry on LHS","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/1c68d859b76b457b7c0c40fa13c9cf22.jpeg","path":"1c68d859b76b457b7c0c40fa13c9cf22.jpeg","width":794,"height":794,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":11.22,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"11.22","retail_price":"0","available":true,"url":"\/products\/yard-bars-the-storehouse-by-taverns-to-1429724011?variant=ed506f22-6807-425d-9798-fcd7391c7d92","available_quantity":1000,"options":[{"name":"Configuration","value":"Bar entry on LHS"}],"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":"ed506f22-6807-425d-9798-fcd7391c7d92","product_id":"c756814e-c6bb-4919-98ea-d3c4608b3716","title":"Bar entry on LHS","weight_unit":"kg","inventory_quantity":1000,"sku":"sku2118839280441","barcode":"","position":1,"option1":"Bar entry on LHS","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/1c68d859b76b457b7c0c40fa13c9cf22.jpeg","path":"1c68d859b76b457b7c0c40fa13c9cf22.jpeg","width":794,"height":794,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":11.22,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"11.22","retail_price":"0","available":true,"url":"\/products\/yard-bars-the-storehouse-by-taverns-to-1429724011?variant=ed506f22-6807-425d-9798-fcd7391c7d92","available_quantity":1000,"options":[{"name":"Configuration","value":"Bar entry on LHS"}],"off_ratio":0,"flashsale_info":[],"sales":0};
return `
`
}()}