Class: Spree::Search::MultiDomain

Inherits:
Core::Search::Base
  • Object
show all
Defined in:
lib/spree/search/multi_domain.rb

Instance Method Summary collapse

Instance Method Details

#get_base_scopeObject



3
4
5
6
7
8
9
10
11
12
# File 'lib/spree/search/multi_domain.rb', line 3

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

#prepare(params) ⇒ Object



14
15
16
17
# File 'lib/spree/search/multi_domain.rb', line 14

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