iPhone Magento theme compatible with Android
After installing the iPhone Theme for Magento via Magento Connect do the following:
Simply configure the exceptions under “System”->”Configuration”->”Design”
Expand “Themes” see the screenshot and use the values “Mobile Safari|iPhone|iPod” for Matched expression, and “iphone” for value. Since both iPhone and Android use WebKit they will both return the user agent as “Mobile Safari”. Be sure and realize it IS case sensitive for all values.
However after some further testing with some iPhones won’t return “Mobile Safari” so the condition for iPhone or iPod needs to be added as well.
Cheers!
Update: More details about Which Browser is used in Android
Possibly Related Posts:
- Magento Commerce Error Reporting Tip
- Android SDK 2.01 Emu WebKit User Agent
- Eclipse + ZendStudio + ZendServer + Android SDK = Awesome IDE
- Magento: Paypal Standard IPN Double Totals Bug 1.3.2.3 + fix
- Magento Tutorial Video: Display Product Images in Blocks and Pages














December 4th, 2009 at 7:32 am
Hi,
I am developing one shopping cart with iPhone magento theme. I wants to add support for android in it.
I’ve done the settings, as per your post in my iPhone Magento site.
But when i try to open the site in Android Simulator Browser then it is not going to open.
Please guide me through right way.
Thanks.
December 4th, 2009 at 1:19 pm
John,
I don’t think the Android simulator browser will return the proper user agent. The above does in fact work atleast tested on my Android G1 and an iTouch, and iPhone.
If you can use the simulator to go to http://whatsmyuseragent.com and insert it into the Matched expressions with an ‘|’ OR condition.
You may be able to use ‘Android|Mobile Safari|iPhone|iPod’ for Matched expression for the simulator and possibly other Android devices that aren’t using the built in web browser.
Hope this helps.
December 7th, 2009 at 6:09 pm
[...] got curious what the Android 2.01 SDK User Agent was returning after toying around with the iPhone theme for Magento. It appears Apple has standardized the UserAgent and “Mobile Safari” as a condition [...]
December 9th, 2009 at 2:02 pm
THANK YOU SOOOOOO!!! MUCH!! You don’t know how frustrating it’s been to get this iphone theme to work as there is somewhat a lack of documentation to get it to really work. You are awesome!!!
January 2nd, 2010 at 10:46 pm
Adding ‘iphone’ in the first text field in each section resulted in my default theme breaking slightly and causing validation errors due to duplicate content (id’s).
Removing this everything worked. Ie. only complete the Matched Expressions and Value Fields
January 30th, 2010 at 3:03 pm
Thank you very much – without this I thought I was going to go mad:) please follow these instructions everyone:) thanks again
March 1st, 2010 at 11:29 am
For what it’s worth, this is my matched User Agent list to divert to mobile template. Has redundancy but seems to catch most of what is out there now.
iPhone|iPod|BlackBerry|Pre|Palm|Googlebot-Mobile|Mobile|mobile|mobi|Safari Mobile