mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Fix search by producer, BUU product page
This commit is contained in:
@@ -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'
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user