Aman Aalam
Aman Aalam

Reputation: 11251

A mobile store on Magento using the iPhone theme

The thread is pretty long, but only for the sake of explanation. I need to know the correct way of having a mobile website of our current store in the following scenario:

I already have a store with two different Websites, each having at least two Store Views for different languages.

One Website has two Store Views for English and French The other has two Store Views for English and German

These websites are managed on the same domain by using the subfolder method of having multiple websites running on a same domain (mywebsite.com/en and mywebsite.com/de etc)

The inventory is being managed on the Website level. (With an extension)

We now want to introduce a mobile site for this store, and for that I am planning to have a different store view in every website, having the iPhone theme applied. So, for the mobile website: Website1 will have two more store views with iPhone theme: One for English, the other for French Website2 will have two more store views with iPhone theme: One for English, the other for German

How correct is this going to be?

We would further want to have a redirection logic so that if our store is accessed from a mobile device, the mobile version is displayed. Where can I put the redirection logic? in the main index.php?

Do let me know if any other detail is required.

Upvotes: 2

Views: 1167

Answers (1)

georgiecasey
georgiecasey

Reputation: 23391

I presume you've come across this but Magento can change the theme based on user-agent. Set this in the design tab of System->Configuration. You 'Add Exception' and include a list of mobile user agents, for example: iPhone|iPod|BlackBerry|Palm|Googlebot-Mobile|Mobile|mobile|mobi|Windows Mobile|Safari Mobile|Android|Opera Mini

Then set the theme you want to show if the regex matches, in my example I just use the default iphone theme that's in skin/frontend/default/iphone. I presume you can set different mobile themes for different websites and store views.

Screenshot of System-Configuration-Design

Upvotes: 7

Related Questions