Magento mobile theme (how to redirect users to mobile theme)

Magento

Suppose that we have a website based on magento platform, and we have installed allready two themes, one for normal users and one for mobile users, or mobile devices.

For detect and redirect mobile users to mobile theme, can be done in many ways. In this article i present maybe simplest way to do that. For detect and redirect users to mobile theme and otherwise display normal theme following steps must be done:

1. Login to the admin

2. Goto System > Configuration > General > Design -> Theme sections

3. Click "Add Exception" (for template, skin, layout, translations)

4. Enter matched expression

5. Click Save Configuration

Observation:

1. To detect most of the mobile devices at step 4 following expression can be used: "iPhone|iPod|BlackBerry|Palm|Googlebot-Mobile|mobi|Windows Mobile|Android|Opera Mini"

2. If is added exeption for templates, and you have product or categories that have set custom design (other customized theme), at least in my magento test version it will be ignored and themes will be same theme as you set in exception, if user is a mobile user.


Add comment
 
 
 

Comments