0

When I used User Agent Rules and select another theme for iphone (for example), changes are done in CSS only, but I want to change content and layout too.

2
  • Welcome to Magento SE. Please explain your configuration in a bit more detail. The title looks like you have different store views for mobile and desktop ("store view" has a specific meaning in Magento), but the question does not mention store views at all, only user agent rules. Commented Aug 4, 2017 at 8:38
  • pls check pepperfry.com in desktop and mobile I search best soulation to build website smilar it . I already done 70% desktop view and now I want to adabt mobile view - u will notic mobile view not used same layout in desktop . thanks
    – mohammed
    Commented Aug 4, 2017 at 15:13

1 Answer 1

0

The User Agent Rule only changes the theme but the store view remains the same.

To achieve what you want, you have 2 possibilities. Both of them require you create a new store view for mobile users.

First solution is to assign a different subdomain for the new store view, like m.domain.com, and on .htaccess level redirect the users to the correct store view based on user agent (see here)

The second solution is to filter the user agent in index.php and for each set, load the correct store view. This way you can keep both store views on the same domain

2
  • Great Thanks and I will test it and back to u
    – mohammed
    Commented Aug 4, 2017 at 14:07
  • about " The second solution is to filter the user agent in index.php and for each set, load the correct store view. This way you can keep both store views on the same domain " any guide reference ?
    – mohammed
    Commented Aug 4, 2017 at 14:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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