Page 1 of 1

What's the method for get the product category?

Posted: Sun Feb 12, 2012 11:42 pm
by Gui Siani
Sorry if this post was duplicate.. but the search field isn't work!

Please, could you tell me how can i get the product category?

I need to use the category from product on "catalog/controller/checkout/confirm.php" But this method:

Code: Select all

$this->data['category'] = $this->config->model_catalog_product->getCategories(PRODUCT ID);
returns an error:

Code: Select all

Fatal error: Call to a member function getCategories() on a non-object in /home/tribomid/public_html/sieshop/catalog/controller/checkout/confirm.php on line 353
What should i do?

Thanks!

Re: What's the method for get the product category?

Posted: Mon Feb 13, 2012 12:21 am
by Qphoria
Change;

Code: Select all

$this->config->model_catalog_product
to

Code: Select all

$this->model_catalog_product

Re: What's the method for get the product category?

Posted: Mon Feb 13, 2012 7:33 am
by dimko
Can something like this be used for this one:

http://forum.opencart.com/viewtopic.php?f=20&t=53077

Or it's a way different thing? :)