Patriot water system logo for Whole House Water Softener.
jQuery(document).ready(function($) { var productNotRequiringScheduling = 3553; // Product ID of the product that does not require scheduling var showPopup = true; console.log("Checking cart items..."); // Loop through each item in the cart $('table.shop_table tbody tr').each(function() { // Get the product ID from the data attribute var productId = $(this).data('product_id'); console.log("Product ID: ", productId); if (productId == productNotRequiringScheduling) { showPopup = false; } }); // Show the popup if no products match the ID that does not require scheduling if (showPopup) { console.log("Showing popup..."); $('.show-scheduling-popup').trigger('click'); } else { console.log("Not showing popup because product ID", productNotRequiringScheduling, "is in the cart."); } });