Automatically change store based on user location magento

Posted by on May 3, 2014 in Magento | 5 Comments

Magento has the inbuilt facility to set up multistore functionality in the admin side.It can be managed from the front end by a store switcher or language switcher.But what if we needed to be automatically change store based on user …

Map integer to text string in mysql

Posted by on Mar 18, 2014 in MySQL, Php | No comments yet

We can use the functions CASE .. WHEN … to map integer to text string in mysql The example query is as shown below You can also use the ELSE clause to specify a default, e.g.

Delete all categories in Magento

Posted by on Mar 18, 2014 in Magento | No comments yet

If you have been working on a demo store – or yours is still in the early stages of construction, you will probably find it necessary to remove all the categories to start fresh at some point So here is …

Find and Replace with MySQL

Posted by on Mar 7, 2014 in Snippets | No comments yet

— 1st example UPDATE files SET filepath = REPLACE(filepath,’path/to/search’,’path/to/replace’); — 2nd example UPDATE customers SET address = REPLACE(address,’_CODE_’,postcode);

Load More