Fix search by producer, BUU product page

This commit is contained in:
Gaetan Craig-Riou
2024-05-06 15:43:59 +10:00
parent 63807f198b
commit b891a03468
2 changed files with 2 additions and 2 deletions

View File

@@ -23,7 +23,7 @@ module Spree
meta_keywords
variants_display_as
variants_display_name
supplier_name).join('_or_')}_cont".freeze
variants_supplier_name).join('_or_')}_cont".freeze
belongs_to :product, -> { with_deleted }, required: true, touch: true, class_name: 'Spree::Product'
belongs_to :tax_category, class_name: 'Spree::TaxCategory'

View File

@@ -108,7 +108,7 @@ class ProductsReflex < ApplicationReflex
def ransack_query
query = {}
query.merge!(variant_supplier_id_in: @producer_id) if @producer_id.present?
query.merge!(variants_supplier_id_in: @producer_id) if @producer_id.present?
if @search_term.present?
query.merge!(Spree::Variant::SEARCH_KEY => @search_term)
end