7

I want to load device wise (like mobile and tablet) theme in Magento 2.

How can I do that?

I have tried below code in User Agent Rules but not working for me:

 iPhone|iPod|BlackBerry|Palm|Googlebot-Mobile|Mobile|mobile|mobi|Windows Mobile|Safari Mobile|Android|Opera Mini
8

Try to create multiple exceptions for each device enter image description here

| improve this answer | |
1
  1. In Admin Panel go to Content-> Design-> Configuration
  2. Choose the store that you need
  3. In Design Rule section add new User Agent Rules with next string:
    /iPhone|iPod|BlackBerry|Palm|Googlebot-Mobile|Mobile|mobile|mobi|Windows Mobile|Safari Mobile|Android|Opera Mini/i
    and choose the needed theme for mobile
| improve this answer | |
0

Here is the tutorial for this: https://youtu.be/v7R46oqkPBs

| improve this answer | |
0

I think the OP is looking at Magento 1.9 admin, while the responder is giving Magento 2.x admin instructions.

| improve this answer | |
0

You can use below solution to catch every tablet and every mobile device for different theme.

I found one solution.

first you need to add user agent for tablet like as below.

/(tablet|ipad|playbook|silk)|(android(?!.*mobile))/i

with this user agent you will select every tablet device.

after that you need to add user agent for mobile device like as below.

/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/

with this user agent you will select mobile devices.

for more information about user agent you can check below link.

enter image description here

https://gist.github.com/dalethedeveloper/1503252

hope this answer will work for you.

Thank you

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.