sixthmind Posted March 12, 2012 Share Posted March 12, 2012 I have a custom template called products-categories.tpl, listing all main subcategories, which link to subcategory page with list of products. I would like to show a number of products each subcategory has in this custom template, but I am not sure how to do this. There is a variable called $nb_products in CategoryController and the code for it is: $nbProducts = $this->category->getProducts(NULL, NULL, NULL, $this->orderBy, $this->orderWay, true); $this->pagination((int)$nbProducts); self::$smarty->assign('nb_products', (int)$nbProducts); $cat_products = $this->category->getProducts((int)(self::$cookie->id_lang), (int)($this->p), (int)($this->n), $this->orderBy, $this->orderWay); Anybody knows what code would I have to put in my custom template controller so that I could display a number of products next to each subcategory? Any help would be really appreciated. Link to comment Share on other sites More sharing options...
sixthmind Posted March 14, 2012 Author Share Posted March 14, 2012 Nobody knows the answer to this? Showing number of products next to a subcategory in custom template? Could somebody put me in the right direction at least? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now