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.

More»

PHP undefined function mssql_connect and sqlsrv_connect

Posted by Damodar Bashyal on April 06, 2016

 

mssql_connect is now deprecated - http://php.net/manual/en/function.mssql-connect.php now move to sqlsrv_connect - http://php.net/manual/en/function.sqlsrv-connect.php

ERROR: exception 'Exception' with message 'connection to mssql is not supported. Please download and follow directions from here - https://www.microsoft.com/en-us/download/details.aspx?id=20098' 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 https://www.microsoft.com/en-us/download/details.aspx?id=20098

More»

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:

More»