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
  • 57,247
  • 24
  • 95
  • 149
DomingoSL
  • 14,282
  • 22
  • 92
  • 171

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,091
  • 6
  • 35
  • 55