VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: balai on October 25, 2016, 13:22:51 PM

Title: Show/Hide child products in categories based on the parent_id
Post by: balai on October 25, 2016, 13:22:51 PM
We are confronting some issues when we want to search and filter child products.

Child products are missing some fields like categories and manufacturers which makes it quite hard to search/filter them.

We want to assign these fields but then we have the drawback that they will be always displayed in the category pages.

A great feature would be to have a setting letting us to display or not child products in the category (or other) pages.
I suppose that it is quite simple to be implemented by just adding a small where clause to check if the product_parent_id > 0
Title: Re: Show/Hide child products in categories based on the parent_id
Post by: Milbo on October 25, 2016, 15:30:48 PM
The same counts for the filter query, just check for the parent product id. There are examples in our code for that.
Title: Re: Show/Hide child products in categories based on the parent_id
Post by: balai on October 26, 2016, 10:24:17 AM
The problem is not in the query is in the views/layouts.
Why not offering the user the flexibility to assign all these fields (categories, manufacturers, etc) to the child products and decide which type of products (parent/child ,or all) will be loaded in the category pages, without being forced to do compromises in his data structure?