Mambo Italiano goes Green! Now that’s Italian!

Well and many of you Bellinghamsters know winter has come early this year. In an effort to combat the cold, Mambo Italiano Cafe has decided to install several infrared radiant heaters throughout the restaurant. Thanks to Jeff at www.heatinggreen.com for turning us on to this up and coming environmental friendly cure for the winter chills.
Shopping Cart
(function () { // Early exit if the page doesn't have our UI document.addEventListener('DOMContentLoaded', function () { console.log('[HG] JS loaded'); // Sanity checks if (!window.hg_ajax_obj || !window.hg_ajax_obj.ajaxurl) { console.error('[HG] ajaxurl missing. Is the PHP snippet active?'); return; } var grid = document.getElementById('product-grid'); if (!grid) { console.error('[HG] #product-grid not found. Set the CSS ID on the section containing the Woo Products widget.'); return; } // Use event delegation so columns/buttons/inner elements all work document.addEventListener('click', function (e) { var btn = e.target.closest('.ajax-filter-btn'); if (!btn) return; e.preventDefault(); // Read tag from data attribute var tag = btn.getAttribute('data-tag'); if (!tag) { console.warn('[HG] Clicked filter has no data-tag'); return; } // Active state document.querySelectorAll('.ajax-filter-btn.active').forEach(function (el) { el.classList.remove('active'); }); btn.classList.add('active'); // Loading state grid.classList.add('loading'); console.log('[HG] Sending AJAX for tag:', tag, '→', window.hg_ajax_obj.ajaxurl); // AJAX (fetch) var form = new FormData(); form.append('action', 'heatinggreen_filter_products'); form.append('tag', tag); fetch(window.hg_ajax_obj.ajaxurl, { method: 'POST', credentials: 'same-origin', body: form }) .then(function (r) { return r.json(); }) .then(function (json) { if (!json) { console.error('[HG] Empty JSON response'); return; } if (json.success) { grid.innerHTML = json.data.html; console.log('[HG] Updated grid for tag:', tag); } else { console.error('[HG] Server error:', json.data && json.data.message ? json.data.message : json); } }) .catch(function (err) { console.error('[HG] AJAX error:', err); }) .finally(function () { grid.classList.remove('loading'); }); }); }); })();