I tried many ways like this:
Code: Select all
$this->model_catalog_category->getProductsByCategoryId($this->request->get['product_id']);

Code: Select all
$this->model_catalog_category->getProductsByCategoryId($this->request->get['product_id']);
Awnser from ckonigYou can use the product model to get all categories of a product
CODE: SELECT ALLBUT:Code: Select all
$this->load->model('catalog/product'); $categories = $this->model_catalog_product->getCategories(YOURPRODUCTID);
What are you going to do with products that are in more than one category?
Users browsing this forum: Bing [Bot] and 106 guests