Magento themes and extensions

Adding New Regions/States to your Magento Installation

Posted on November 18th, 2012 | Posted by admin

You may have noticed that Magento doesn’t include the Region/State information for a lot of countries. This can be particularly frustrating if you’re trying to set up your shipping rules and would rather use states than postal codes or if you just want to show a nice drop down on the front end of Magento for your customers.

There is a solution, to manually add the information to  the tables in your database. The tables are directory_country_region and directory_country_region_name.  The table directory_country_region holds the region codes and region id and then the directory_country_region_name provides the translation for you locale by using the region id  and the locale you want to provide the translation for. Magento will then pick up on this and populate a drop down list.

I’ve already done this for the UK (translated to English only). Please find the CSV files at the below links which you can upload via phpMyAdmin. Don’t forget to change the delimiter to comma rather than semi-colon as it is by default.  These are provided as is and can be freely edited.

Adding Pinterest Button to Magento Product Page

Posted on November 17th, 2012 | Posted by admin

Pinterest looks like it is going to be the next big thing to hit the internet. It has grown massively in a short amount of time and is a very effective marketing tool for e-commerce websites, providing you have good quality images.

I have recently added the “Pin-It” button to FOODO, my Australian food website. I tried to play with adding to to every page of the website but it wouldn’t work, so I had to settle adding it only to the product pages.

The page you want to add the code to is called view.phtml located within your theme at/app/design/frontend/theme/theme/template/catalog/product/.

Migrating Magento to another server

Posted on November 16th, 2012 | Posted by admin

Migrating your Magento website to another server is relatively a simple task once you know how to do it of course. I have detailed the steps on how to do this below so you can use this post as a point of reference
From the admin, go to Configuration -> Web -> and change the (Unsecure and Secure) fields to {{base_url}}.
From the admin, go to System -> Tools -> Backups and click on the backup button. This will create a backup of your database.
Make a copy your Magento root.
Move all data over to the new server.
Restore the database on the new host.
If you have a different username, password or database name. You’ll need to update that as well. You can find the file in (‘magento_root/app/etc/local.xml’) and make the required changes.
Navigate to your Magento root, and delete all of the files and folders in, (i.e. /var/www/magento/var) except for the .htaccess file.

Magento Deleting Stores Manually

Posted on November 15th, 2012 | Posted by admin

If you ever ruin into a situation where you need to remove stores
or websites from Magento using the database.

You can do so using the tables listed below:

core_website - to remove websites

core_store  - to remove store views
core_store_group - to remove stores


Posted on November 14th, 2012 | Posted by admin

Let’s talk about one situation. We are in shop made in Magento.

We are on configurable product page. One of configurable attributes is color. Wouldn’t it be good idea, after color is chosen show only images of this color? It can be… and it’s not hard to achieve.

First we must do some preparations:

Create attribute “image_storing” type boolean and add it to your attribute sets. Can be limited only to simple products.

For each color of superproduct (configurable+simples) choose one simple product and set value to yes, also to this product upload images of this color.

Now create new module called “imageswitch” (or whatever you want, just remember to change it in the following code).

In it you must have a controller looking like this: