News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

generic child variants

Started by Tchiorny, June 14, 2012, 18:12:39 PM

Previous topic - Next topic

Tchiorny

Hello,

I have products available in different packagings (50 seeds, 100 seeds,...). As I understand, this is a situation where using child products is appropriate. So I've set the smallest package as the parent product and the bigger packages as child products. A parent product may belong to multiple categories (e.g., product "Danvers carrot, 30 seeds" belongs to four categories : "Vegetables", "Roots", "Apiacea" and "Carrots"). Categories are not set for a child product (e.g., "Danvers carrot, 60 seeds"), so it's hidden when browsing categories, but it will still show up if searched by name, what is fine. Thanks to the "generic child variants" custom field, currently shown packaging is preselected in the drop down menu which allows to eventually select another packaging. But the problem is that the parent product appears as many times in the list as to how many categories it belongs to (e.g., the "Danvers carrot, 30 seeds" appears four times in the list while "Danvers carrot, 60 seeds" appears only once). If I set only one category for the the parent product, then it's listed only once, as should be. So it seems that 0 or 1 category is OK, but more categories gives duplicates in the list. Maybe due to a faulty loop in the code ?

My environment : VirtueMart 2.0.6, Joomla 2.5.4 and PHP 5.3.10, all on remote server.

Milbo

Interesting

there is a group by missing.
Quote from: Tchiorny on June 14, 2012, 18:12:39 PM
the problem is that the parent product appears as many times in the list

Which list? Please give a link
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Tchiorny

Hi Milbo,

I meant the list of child products displayed in the drop down menu, like in this example where the parent product appears four times as it belongs to four categories.