How to call a function of Model in Controller.?

If you are looking to call model function in controller then you can use the below query to get desired work done accordingly.

You can use below methods to call model function in controller with respective syntax.


$yourModel = Mage::getModel('modulename/modelname')->Method();

With this method you can call model function in Magento


If you are looking for catalog category then use this query.

Mage::getModel('catalog/category')->load($id);

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *