VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: reddevil on December 07, 2012, 11:56:07 AM

Title: how can i get all products from category?
Post by: reddevil on December 07, 2012, 11:56:07 AM
hi,

in productdetails I use:

$categoryModel= VmModel::getModel('category'); //Load the category model
$category = $categoryModel->getCategory($this->product->virtuemart_category_id);   //Load products in that category
$productModel= VmModel::getModel('product'); //Load the product model
$products = $productModel->getProductsInCategory($this->product->virtuemart_category_id);

, but I get no more 9 products, since  I have max products on one page = 9! how can change this?

please help!

Thanks/
Title: Re: how can i get all products from category?
Post by: Peter Pillen on December 07, 2012, 15:12:12 PM
there is a contradiction in question... productdetails is the page used for the detailed page. I suppose you want to set the number of products in the category view?

you can set this in virtuemart > configuration > frontend
Title: Re: how can i get all products from category?
Post by: reddevil on December 07, 2012, 15:34:22 PM
NO), I want to show all products of current category on productdetails page!
Title: Re: how can i get all products from category?
Post by: Virtual on December 07, 2012, 16:32:46 PM
Product Categories > your category > Category Form Initial Display Records