0

In my main page im retrieving the list of categories using just:

$results = $this->model_catalog_category->getCategories();

Using the same logic to retrieve the manufacturers list:

$results = $this->model_catalog_manufacturer->getManufacturers();

But this time I get an error:

Fatal error: Call to a member function getManufacturers() on a non-object in C:\wamp\www\ecommerce\catalog\view\theme\pinshop\template\common\home.tpl

So I guess in home.tpl the contant model_catalog_manufacturer is not defined, Am I right? How can I solve this?

tereško
  • 58,060
  • 25
  • 98
  • 150
DomingoSL
  • 14,920
  • 24
  • 99
  • 173

1 Answers1

1

You need to load the manufacturer model before you can use the method

$this->load->model('catalog/manufacturer');

Once you add that before the $results = ... line above, it will work

Jay Gilford
  • 15,141
  • 5
  • 37
  • 56