Class: Spree::ProductsController
Instance Method Summary
collapse
#cart_link, #unauthorized
Instance Method Details
#index ⇒ Object
11
12
13
14
15
|
# File 'app/controllers/spree/products_controller.rb', line 11
def index
@searcher = build_searcher(params.merge(include_images: true))
@products = @searcher.retrieve_products
@taxonomies = Spree::Taxonomy.includes(root: :children)
end
|
#show ⇒ Object
17
18
19
20
21
22
|
# File 'app/controllers/spree/products_controller.rb', line 17
def show
@variants = @product.variants_including_master.active(current_currency).includes([:option_values, :images])
@product_properties = @product.product_properties.includes(:property)
@taxon = Spree::Taxon.find(params[:taxon_id]) if params[:taxon_id]
redirect_if_legacy_path
end
|