Sha256: 9398afde96db46042a9e319faf7d2988fcdcafa28c87a21d775814231891cebf

Contents?: true

Size: 628 Bytes

Versions: 12

Compression:

Stored size: 628 Bytes

Contents

module Spree::Search
  class MultiDomain < Spree::Core::Search::Base
    def get_base_scope
      base_scope = @cached_product_group ? @cached_product_group.products.active : Spree::Product.active
      base_scope = base_scope.by_store(current_store_id) if current_store_id
      base_scope = base_scope.in_taxon(taxon) unless taxon.blank?

      base_scope = get_products_conditions_for(base_scope, keywords) unless keywords.blank?

      base_scope = add_search_scopes(base_scope)
      base_scope
    end

    def prepare(params)
      super
      @properties[:current_store_id] = params[:current_store_id]
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
solidus_multi_domain-1.4.2 lib/spree/search/multi_domain.rb
solidus_multi_domain-1.4.1 lib/spree/search/multi_domain.rb
solidus_multi_domain-1.4.0 lib/spree/search/multi_domain.rb
solidus_multi_domain-1.3.0 lib/spree/search/multi_domain.rb
solidus_multi_domain-1.2.0 lib/spree/search/multi_domain.rb
solidus_multi_domain-1.1.3 lib/spree/search/multi_domain.rb
solidus_multi_domain-1.1.2 lib/spree/search/multi_domain.rb
solidus_multi_domain-1.1.1 lib/spree/search/multi_domain.rb
solidus_multi_domain-1.0.3 lib/spree/search/multi_domain.rb
solidus_multi_domain-1.1.0 lib/spree/search/multi_domain.rb
solidus_multi_domain-1.0.1 lib/spree/search/multi_domain.rb
solidus_multi_domain-1.0.0 lib/spree/search/multi_domain.rb