From 281e22025920b0e4950f038feada5c1262938512 Mon Sep 17 00:00:00 2001 From: Rafael Date: Sun, 16 Nov 2025 20:29:37 +0100 Subject: [PATCH 1/2] Fix all_products_except to exclude unavailable products --- templates/app/overrides/taxon_custom_queries.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/app/overrides/taxon_custom_queries.rb b/templates/app/overrides/taxon_custom_queries.rb index 6e6439c6a..8eb1e9403 100644 --- a/templates/app/overrides/taxon_custom_queries.rb +++ b/templates/app/overrides/taxon_custom_queries.rb @@ -6,7 +6,7 @@ def featured(limit = 3) end def all_products_except(product_ids) - all_products.where.not(id: product_ids) + all_products.where.not(id: product_ids).where.not(available_on: nil) end Spree::Taxon.prepend self From eb39707d042c72d6b57f746bf01a64aa3590a767 Mon Sep 17 00:00:00 2001 From: Rafael Date: Mon, 17 Nov 2025 08:39:33 +0100 Subject: [PATCH 2/2] Update all_products_except to use available scope --- templates/app/overrides/taxon_custom_queries.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/app/overrides/taxon_custom_queries.rb b/templates/app/overrides/taxon_custom_queries.rb index 8eb1e9403..d9138bf2e 100644 --- a/templates/app/overrides/taxon_custom_queries.rb +++ b/templates/app/overrides/taxon_custom_queries.rb @@ -6,7 +6,7 @@ def featured(limit = 3) end def all_products_except(product_ids) - all_products.where.not(id: product_ids).where.not(available_on: nil) + all_products.available.where.not(id: product_ids) end Spree::Taxon.prepend self