Mobile Cart View Not Working

Solved
YRush
New Member
6 0 0

The mobile cart view on my website is not working when you click it nor is the search list; however, everything seems to work just fine in the desktop view.  My customers are not able to go to cart to view and some are evening having issues adding to cart on mobile....please help.

yrushcollective.com is by url.

0 Likes
DigitalArtisans
Tourist
166 13 30

Hello @YRush !

 

  1. In your Shopify admin go to online store > themes > actions > edit code
  2. In your theme.liquid file, find the </body> (press CTRL + F or command + F on Mac)
  3. Paste the follwoing code right above the </body> tag

 

<script>

    function addToCartMobileClick() {

 

if (!/product/.test(window.location.href)){

return;

}

 

        var btn = document.querySelector(`#mst-stiky-box button`);

 

btn.addEventListener('click', function(){

var atc = document.querySelector(`.grid__item.row_grid_qnt button`);

 

atc.click();

});

    }

 

addToCartMobileClick()

</script>

 

Thanks,

Digital Artisans

Hatim Ayoub | Designer | Developer
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted
0 Likes
YRush
New Member
6 0 0

I tried that and it's still doing the same thing on the mobile.  Does it need time to update perhaps?

0 Likes
DigitalArtisans
Tourist
166 13 30

Hello @YRush,

 

Kindly also update.

 

Thanks,

Digital Artisans

Hatim Ayoub | Designer | Developer
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted
0 Likes
YRush
New Member
6 0 0

Once I entered the code, I saved.  Am I missing something.

My apologies for all the questions....this part is foreign language to me.

0 Likes
DigitalArtisans
Tourist
166 13 30

Hello @YRush ,

Once you enter the code save it and refresh. Please make sure you follow accurately the code placement.


Thanks,
Digital Artisans

Hatim Ayoub | Designer | Developer
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted
0 Likes
YRush
New Member
6 0 0

ok so I place the code here:

YRush_0-1619975363633.png

Is this accurate?

 

 

0 Likes
DigitalArtisans
Tourist
166 13 30

This is an accepted solution.

Yes that’s right.

Hatim Ayoub | Designer | Developer
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted
0 Likes
YRush
New Member
6 0 0

ok...it still won't update on the mobile for some odd reason.  Thanks for your input!

0 Likes