I'm building a VirtueMart site that has hierarchical product categories, i.e.:
Grinders -> Metal | Plastic | Electric
...Where "Grinders" is the parent category (and contains nothing) with Metal/Plastic/Electric being child categories and containing products.
I'm ultimately wanting the category page for the parent category to display 开发者_高级运维a random mix of products from the three child categories, but it seems like there's not a default VirtueMart template that does this. I have a bunch of other categories that could use this style of page display (A little more like Amazon; i.e., always having a bunch of products visible on every category page).
Any idea how I'd go about this? It seems either I'm overusing categories or I'll need to create a new template file from one of the "browse_" pages (if anyone has a quick bit of code to do the random child category products, that would suffice to answer my question sufficiently).
Thanks!
There are 2 ways to do this. First, the no code way is to simply put your products in both the parent and child category. VM allows you to put products in multiple category by holding down the CTRL key when selecting categories.
The other way is to hack the core code, which does present a problem when updating. You may need to apply the hack after updating since this is a core file. Details on the changes here -
http://forum.virtuemart.net/index.php?topic=20837.msg168459#msg168459
精彩评论