MySQL – Select date from a range without table

October 19, 2016 17:52
Tags: ,

Sometimes you want to get the date range from MySQL without table. Here you are: It is useful when you want to generate some reports.

Comments Off

How to setup PhpStorm for Drupal

July 12, 2013 12:50

PhpStorm is a great IDE with PHP. By default it supports Drupal development. Please refer to TigerFish’s blog – Setting up JetBrains PhpStorm for use as a Drupal IDE for detail. Enjoy the powerful of PhpStorm.

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 [...]

MIGS (Server Hosted) for Virtuemart

August 16, 2012 11:23

Recently my company’s shopping cart which using Virtuemart with Joomla needs to change the payment gateway from Pay Dollar to MIGS. I’ve made MIGS payment gateway using “Server Hosted” method for Magento two years ago but no idea how to implement payment gateway for Virtuemart. I’ve searched in Google but only find “Merchant Hosted” codes, [...]

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 ~