How to override Magento Observers?

Posted by Damodar Bashyal on November 24, 2016


How to override Magento Observers?

Today's task was to show/hide M2ePro's 'Show eBay Order' button based on permission. Earlier I had done the similar task for 'Create RMA' button which was quite straight forward. But that rewrite didn't work this time as it was an Observer.

This is how I was able to hide 'RMA' tab and 'Create RMA' button from Magento order view page.


PHP undefined function mssql_connect and sqlsrv_connect

Posted by Damodar Bashyal on April 06, 2016


mssql_connect is now deprecated - now move to sqlsrv_connect -

ERROR: exception 'Exception' with message 'connection to mssql is not supported. Please download and follow directions from here -' in C:\_projects\technooze\app\code\local\Technooze\Schoolbrochure\Model\Mssql.php:182

For sqlsrv_connect to work download (Microsoft Drivers for PHP for SQL Server) from


Magento Missing argument 1 for Mage_Core_Block_Template ::setTemplate

Posted by Damodar Bashyal on April 04, 2016


If you are getting this magento error. It's easy to find why you are getting this error: Just need to add some debug code:

Open file app/code/core/Mage/Core/Block/Template.php and go to function setTemplate() (line 111 as shown in error log) and add these lines: