Product Image not showing on Mobile Version

Solved
Lissette
New Member
2 0 1

Hello All,

I'm having issues with the mobile version of my shop displaying main product images. When you click a pic of a product and go to product page image completely disappears. Any suggestions/guidance/help would be greatly appreciated.

Accepted Solution (1)

Accepted Solutions
Adam_K
Shopify Staff
1 1 0

This is an accepted solution.

Hey Lissette, looking at your site, there is a javascript error that is causing the issue when viewing on mobiles. 

You should be able to rectify this with a little edit to the theme code.  If you head to your theme.js.liquid file and find the following line of code (around line 1679):

 amountToScroll = topBar.clientHeight; 

And replace it with the following

if (topBar) {
  amountToScroll = topBar.clientHeight;
}

This should fix the error happening on mobile devices. 

I would duplicate your live theme before making any edits in case you need to roll back. 

Hope this helps!

Adam

 

View solution in original post

Replies 2 (2)
Adam_K
Shopify Staff
1 1 0

This is an accepted solution.

Hey Lissette, looking at your site, there is a javascript error that is causing the issue when viewing on mobiles. 

You should be able to rectify this with a little edit to the theme code.  If you head to your theme.js.liquid file and find the following line of code (around line 1679):

 amountToScroll = topBar.clientHeight; 

And replace it with the following

if (topBar) {
  amountToScroll = topBar.clientHeight;
}

This should fix the error happening on mobile devices. 

I would duplicate your live theme before making any edits in case you need to roll back. 

Hope this helps!

Adam

 

View solution in original post

Christinahadi
Excursionist
34 0 5

Hi Adam,

I seem to be experiencing the same problem, could you help me out for my shopify too please?

Thanks so much!

mycontourlab.com 

 

Christina