Yard Bars - The Open Bar by Taverns-To-Go (Various Sizes)
${function() {
const variantData = data.variant || {"id":"72d0f85e-8601-4b3e-b977-63e87fc2d309","product_id":"5b374966-7326-4f59-8943-c4c76bcd105d","title":"The Castlebar 8'x5'-Inc. wine glass rack","weight_unit":"kg","inventory_quantity":999,"sku":"sku2118839279207","barcode":"","position":1,"option1":"The Castlebar 8'x5'","option2":"Inc. wine glass rack","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/3806e4e36ab642260e96715f6bc199a9.jpeg","path":"3806e4e36ab642260e96715f6bc199a9.jpeg","width":794,"height":1059,"alt":"","aspect_ratio":0.7497639282341831},"wholesale_price":[{"price":9.95,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"9.95","retail_price":"0","available":true,"url":"\/products\/yard-bars-the-open-bar-by-taverns-to-go-875047100?variant=72d0f85e-8601-4b3e-b977-63e87fc2d309","available_quantity":999,"options":[{"name":"Model","value":"The Castlebar 8'x5'"},{"name":"With wine glass rack included","value":"Inc. wine glass rack"}],"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 `
`;
}()}
Model:
The Castlebar 8'x5'
${function(){
const optName = "Model";
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}
`
}()}
With Wine Glass Rack Included:
Inc. wine glass rack
${function(){
const optName = "With wine glass rack included";
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
$9.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":"72d0f85e-8601-4b3e-b977-63e87fc2d309","product_id":"5b374966-7326-4f59-8943-c4c76bcd105d","title":"The Castlebar 8'x5'-Inc. wine glass rack","weight_unit":"kg","inventory_quantity":999,"sku":"sku2118839279207","barcode":"","position":1,"option1":"The Castlebar 8'x5'","option2":"Inc. wine glass rack","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/3806e4e36ab642260e96715f6bc199a9.jpeg","path":"3806e4e36ab642260e96715f6bc199a9.jpeg","width":794,"height":1059,"alt":"","aspect_ratio":0.7497639282341831},"wholesale_price":[{"price":9.95,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"9.95","retail_price":"0","available":true,"url":"\/products\/yard-bars-the-open-bar-by-taverns-to-go-875047100?variant=72d0f85e-8601-4b3e-b977-63e87fc2d309","available_quantity":999,"options":[{"name":"Model","value":"The Castlebar 8'x5'"},{"name":"With wine glass rack included","value":"Inc. wine glass rack"}],"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":"72d0f85e-8601-4b3e-b977-63e87fc2d309","product_id":"5b374966-7326-4f59-8943-c4c76bcd105d","title":"The Castlebar 8'x5'-Inc. wine glass rack","weight_unit":"kg","inventory_quantity":999,"sku":"sku2118839279207","barcode":"","position":1,"option1":"The Castlebar 8'x5'","option2":"Inc. wine glass rack","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/3806e4e36ab642260e96715f6bc199a9.jpeg","path":"3806e4e36ab642260e96715f6bc199a9.jpeg","width":794,"height":1059,"alt":"","aspect_ratio":0.7497639282341831},"wholesale_price":[{"price":9.95,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"9.95","retail_price":"0","available":true,"url":"\/products\/yard-bars-the-open-bar-by-taverns-to-go-875047100?variant=72d0f85e-8601-4b3e-b977-63e87fc2d309","available_quantity":999,"options":[{"name":"Model","value":"The Castlebar 8'x5'"},{"name":"With wine glass rack included","value":"Inc. wine glass rack"}],"off_ratio":0,"flashsale_info":[],"sales":0};
return `
`
}()}