Disable Magento Mobile Theme for Tablets and iPad

I made a website that includes a desktop as well as a mobile theme. It works fine, but on the tablet and iPad it shows a mobile theme that I don't want. so i use the following exception

(iPhone | IPOD | BlackBerry | Pre | Palm | Googlebot-Mobile | Moby | Safari Mobile | Windows Mobile | Android | Opera Mini | Mobile) | (IPad |! Silk | Kindle | Xoom | SCH-I800 | Tablet)

but now it also features a mobile theme. Please help me, what can I call the desktop theme on the tablet and iPad.

+4
source share
3 answers

I try a lot of lines. Finally, using this line:

iPhone|iPod|Mobile 

the problem is resolved. It shows the desktop theme in a table and in a mobile mobile theme.

+2
source

For me, the mobile theme will still be downloaded to the iPad using “iPhone | iPod | Mobile” as an expression.

In the end, I created two exceptions for each section, since they work like an if / elseif statement.

The first coincidence was to match the devices onto which I wanted to download the desktop theme, for example. iPad | The tablet is the default download. The second coincidence was for other devices, for example. "iPhone | Mobile" to download the mobile theme.

+1
source

I recently did the same in my project. You need to specify some width of the user agent, to which you can show the mobile site on your desktop. You can get the width from the object of any API that you use, or from the inside by creating some tab in the configuration and specifying the width there.

Hope this helps you.

0
source

All Articles