All about Magento E-commerce Store.......MagentoForum: Add Exception in Magento theming

Saturday, July 9, 2011

Add Exception in Magento theming

When dealing with multi-store Magento site I was wondering how easy it would be to override just a single template for selected store view. I was hoping that the 'Add Exception' [Admin -> System -> Configuration -> Design]option in admin panel would allow me to do this. Unfortunatelly when investigating through the core files I found out that it's only used to match the phrase against the user agent signature ($_SERVER['HTTP_USER_AGENT']). Although not wat I expacted it might still be useful for displaying custom content for selected browsers/devices. The most obvious example would be to use one theme for web browsers and another for mobile devices such as iPhone. Using the settings below the site will use iphone theme for the iPhones and default for all other clients. Note: I've added 'Firefox' exception to be able to preview the site in online iPhopne simulator (http://www.testiphone.com/)

The page displayed in the browser (in this case in Google Chrome) would look like:

And in the iPhone (using simulator)

No comments:

Post a Comment