Get correct date and time in Magento

June 3, 2013 17:38

How to get the correct date and time in Magento with timezone? Here you are: That is.

How to search utf8 wordings in Magento Enterprise Edition with Solr?

April 30, 2013 20:20
Tags: , , ,

Magento Enterprise Edition has an option that can use the Apache Solr for the indexing and searching engine. For English searching is working like a charm, however, not working well with UTF8 encoding like Traditional Chinese. I’ve found that it is because the class “Apache_Solr_Service” sends the search request to Solr with the content-type “application/x-www-form-urlencoded”. [...]

How to add logo or additional information to custom payment method in Magento?

April 25, 2013 17:08

After you finished the functionality of the custom payment module, you may find that the payment method shows in checkout page is without logo: How to add the logo or other additional information below the name of payment method as below image? Well, quite easy. Step 1: in your module config.xml, add following tags in [...]

How to validate your data in Magento?

April 16, 2013 14:39

You should face to data validation when you do some customize development in Magento. The frontend validation is using class element combined with the magic of prototype in “js/prototype/validation.js”. Backend validation simply calls Zend_Validate in every Model->validate() method. Inchoo posted a article about validation which can give you a draft idea about them.

Observer Event Order from Alan Storm

April 11, 2013 19:10

Today Alan Storm made a good answer for the question about the observer event order. Please have a look at below link and you will have a great understanding about the observer event.

Comments Off

How to add product qty to your product collection

March 25, 2013 15:14

Sometimes you have to add the product qty to your product collection which is not included in default. Normally people will get the collection first, then run the below code per product: If you have more than 10000 records, it spends too much time by additional SQL query and increase server loading. Actually you can [...]

How to create member only module in Magento?

June 13, 2011 14:26

Sometimes you may have to implement the module that is for member only, how to do it in Magento? In your controller which extends Mage_Core_Controller_Front_Action, add the following function: If the customer didn’t login, the controller will redirect the page to login page. Got it? Happy Magento’ing ~

Override Controllers in Magento

May 30, 2011 16:41

Sometimes you may have to override the core controllers to add some specific functions, don’t know how to override them? Just simply follow below: If you want to override the some controllers in adminhtml module for admin, add the following XML to your own module’s config.xml: If you want to override the some controllers in [...]

Add session message manually

December 30, 2010 16:31

Sometimes it doesn’t work when using the following codes to show the successful / error message: Doesn’t matter, you can use the below codes to show the successful / error message: That’s easy, right? Happy Magento’ing ~

Comments Off

How to completely disable Magento module

November 12, 2010 14:31

Disable Magento module? Easy, in admin panel, click the menu “System” -> “Configuration” -> “Advanced” in “Advanced” Section, select “disable” for the module you would like to disable, and it’s finish, right? Sorry but … NO! If you disable the module in admin panel, it will only disable the module output, not the module functionalities. [...]