GJC added a nice segment of code in /administrator/components/com_virtuemart/model/product.php
At about line 370 you'll find code like this:
//if(true){ // $where[] = ' `pc`.`virtuemart_category_id` = ' . $virtuemart_category_id; //} else { /*GJC add subcat products*/ $catmodel = VmModel::getModel ('category'); $childcats = $catmodel->getChildCategoryList(1, $virtuemart_category_id,null, null, true); $cats = $virtuemart_category_id; foreach($childcats as $childcat){ $cats .= ','.$childcat->virtuemart_category_id; } $joinCategory = TRUE; $where[] = ' `pc`.`virtuemart_category_id` IN ('.$cats.') '; //}
//if(true){ // $where[] = ' `pc`.`virtuemart_category_id` = ' . $virtuemart_category_id; //} else { /*GJC add subcat products*/ $catmodel = VmModel::getModel ('category'); $childcats = $catmodel->getChildCategoryList(1, $virtuemart_category_id,null, null, true); $cats = $virtuemart_category_id; foreach($childcats as $childcat){ $cats .= ','.$childcat->virtuemart_category_id; } $joinCategory = TRUE; $where[] = ' `pc`.`virtuemart_category_id` IN ('.$cats.') '; //}
You'll notice above I commented out the conditions so that only the GJC code is in user and that is how you display all child products in the parent category.