Jump to content

SOLVED: Viewport dude: Zoom on mobile devices


Recommended Posts

Hi All!

I have a question, it took several days tinkering with my header viewport in PS1.6, because I need the final user can zoom limitless in my store. So I changed the header like this:
 

​<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />


This system works well, but the problem is that it only does the zoom if the mobile browser has selected the option: "desktop view" if it is in standar "mobile view" (which is usually what most users have by default), the store does not zoom :( (I tested with the default android, firefox, chrome and opera)

​Anyone can check this problem??

​This is my web: www.comercialmoyano.com

Edited by MarioCM (see edit history)
Link to comment
Share on other sites

  • 8 months later...
  • 4 weeks later...

The "problem" is in the javascript of the default theme in PS 1.6 (and any themes based on it): https://github.com/PrestaShop/PrestaShop/blob/1.6.0.14/themes/default-bootstrap/js/global.js#L32

 

Basically the default theme arbitrarily disables zooming on Android devices. Why, you ask? I have no idea.

You can disable this behavior by deleting that if statement where the sniffing and disabling happens.

  • Like 3
Link to comment
Share on other sites

  • 1 year later...

Hi all,

I currently work in an e-shop developed by Presta.
Unfortunately we have realised that the final user cannot zoom in the store while navigating through mobile devices such as tablets or smartphones.
We have already asked our developper to solve it but unluckily he informed us that this is a problem related to android operating system and there is no way to fix it.

Regarding this post from 2014 and my developper's information, I feel a bit confused.

Is it possible or not to enable zoom in on moblie devices?

Thank you in advance

Edited by PrestaShop_newbie_ (see edit history)
Link to comment
Share on other sites

Hi all,

 

I currently work in an e-shop developed by Presta.

Unfortunately we have realised that the final user cannot zoom in the store while navigating through mobile devices such as tablets or smartphones.

We have already asked our developper to solve it but unluckily he informed us that this is a problem related to android operating system and there is no way to fix it.

Regarding this post from 2014 and my developper's information, I feel a bit confused.

Is it possible or not to enable zoom in on moblie devices?

Thank you in advance

 

Hi!

 

This exact problem has been fixed in the default theme of PrestaShop. If you have a theme based on it that was personalised before the change happened, it is likely that you need to apply the changes manually. In this case it is not complicated to apply the change, it is just a matter of removing two lines, specifically see this link: https://github.com/PrestaShop/PrestaShop/pull/3503/files

 

If you open the file themes/[your-theme-name]/js/global.js in your website, see the lines highlighted in red, then you can safely removed them. After you apply the change, make sure two a hard refresh (ctrl-shift-r in Chrome or Firefox — cmd-shift-r on a Mac) to make sure the file is updated in the browser cache.

 

Hope it works for you.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...