KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm running Spree 1.3.1 and I'm trying to customize the Taxon show page. I would like it to return the products contained inside the current Taxon, eventually filtered by a property or by an option value. For example let's say that I'm seeing the Taxon of an underwear collection. I'd like to filter the products shown, by providing a certain size (option_type). In this case I should list only products that have variants with the requested size. I would like also to be able to filter the products by the "fit" property. Filtering by the slip fit, I should be able to list only products inside the current Taxon that have the required property. This is the Taxon controller show action: Spree::TaxonsController.class_eval do def show @taxon = Spree::Taxon.find_by_permalink!(params[:id]) return unless @taxon @searcher = Spree::Config.searcher_class.new(params) @searcher.current_user = try_spree_current_user @searcher.current_currency = current_currency @products = @searcher.retrieve_products respond_with(@taxon) end end How should I modify it to fit my needs?
Tags (comma-separated)
Save Edits
Cancel