How to enable a theme for your Magento mobile web site?

You can use execeptions (the good kind) to show different templates on mobile devices.

To add exceptions for the mobile devices, navigate to the Magento administrative area -> System -> Configuration -> Design -> Themes. Click on the Add Exceptions buttons besides the Templates, Skin and Layout labels.

Enter the following line in the Matched Expression field:

iPhone|iPod|BlackBerry|Palm|Googlebot-Mobile|Mobile|mobile|mobi|Windows Mobile|Safari Mobile|Android|Opera Mini

In the Value field enter the name of your newly installed mobile theme and Save the changes.

Then you can open your web site through your computer and your mobile phone. You will see that it loads with two different themes depending on the device.

Bench Marking for Magento Reindexing

Hopefully this will help someone to figure out roughly how long your reindexing should take for your catalog on Magento:


Clearing All Product Data

If you have your test site setup and its time to make room for your real product catalog you can clear out all the product data using the following queries:

Please note, this does not reset the auto increment values on the tables, and don’t forget to update your table prefix (if you have one).

Import Issue – Dead Products

I really like Magento, and I like the import (even if it can be slow). If you put the right data in, it works well and its pretty good at checking your data before you import it… but I have recently discovered an issue which does not appear to be well documented so here I am documenting it.

It may seem obvious but if you assign custom attributes to a product say pack_size to a product which does not have that attribute in its assigned attribute set – it will kill the product edit screen for the product,┬áto the point it will only load the left hand navigation and then it dies.It will also kill your product in the front end of the site.

So just be careful what you assign to your products!

Re-indexing through Shell when Magento doesn’t behave

Sometimes when you have a lot of data, Magento may not always successful index or a server error will leave on of the process set to “processing” in the index panel.

One solution is to run the indexer through shell with the following commands: