Jump to content

Mobile Basket Pops Up At Wrong Part Of Page


Recommended Posts

Hey.

 

I'm having an issue on my site, where on desktop, when a product is added to the basket, it pops up nicely over the screen area. However, on mobile devices, when the add to basket is clicked (the button is halfway down the page), the basket loads at the top of the page, and it's not obvious to customers what's happening, as the screen becomes hard to navigate.

 

Ideally, the basket would pop-up over the button that has been pressed, or the basket would pop-up and fill the screen, so the user can see it immediately, without having to scroll around to find it. From here, the user, as per usual on ecommerce sites, could click to go to checkout or continue shopping.

 

Is there any way to alter how the mobile pop-up works and where its positioned/framed?

 

Thanks in advance.

Link to comment
Share on other sites

  • 2 weeks later...

Thanks for the recommendation, and apologies for the delayed response.

 

A further question, for Vekia perhaps? How can I get the mobile screen to scroll to the top when an item is added to the basket?

 

At the moment, on mobile, when a product is added to the basket, the screen turns grey, as the basket loads at the top of the page. I'd like the page to scroll to the top for the user to instantly see the basket message. Is there a quick fix for this, rather than buying a new module? I'm simply looking at options I have and may not have configured correctly :)

Link to comment
Share on other sites

Try changing line 744 (in PrestaShop v1.6.1.7) in the updateLayer function of themes/<your_theme>/js/modules/blockcart/ajax-cart.js from:

		$('.layer_cart_overlay').show();

to:

		$('.layer_cart_overlay').show();
		$.scrollTo('.layer_cart_overlay', 400);

I haven't tested this, but I expect it will scroll to the overlay after it is shown.

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