Disable a Magento mobile theme for tablet & iPad

不想你离开。 提交于 2019-12-05 17:29:12

I try a lot of strings. At last by using this string:

iPhone|iPod|Mobile

problem is solved. It shows desktop theme in table & in mobile shows mobile theme.

For me, the mobile theme would still load on iPad when using "iPhone|iPod|Mobile" as the expression.

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

First match was to match the devices I wanted the desktop theme to load for e.g. iPad|Tablet to load "default". The second match was for the other devices e.g. "iPhone|Mobile" to load the mobile theme.

I have done recently same thing in my project. You need to specify some width of user agent to which you can show mobile site else your desktop site. You can get width from object of whatever API you are using or from backend part by creating some tab in configuration and specifying width there.

Hope it will help you.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!