Solved

Why is my mobile cart view not working properly?

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.

Accepted Solution (1)
DigitalArtisans
Shopify Partner
378 58 88

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

View solution in original post

Replies 8 (8)

DigitalArtisans
Shopify Partner
378 58 88

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
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?

DigitalArtisans
Shopify Partner
378 58 88

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
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.

DigitalArtisans
Shopify Partner
378 58 88

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
YRush
New Member
6 0 0

ok so I place the code here:

YRush_0-1619975363633.png

Is this accurate?

 

 

DigitalArtisans
Shopify Partner
378 58 88

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
YRush
New Member
6 0 0

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