Jump to content

PS 1.7.6 Shopping Cart modal error


PrestashopLearner

Recommended Posts

Suddenly, the behaviour of the modal changed and I really can't understand what would be the issue. 

 

When closing the modal using the "Continue shopping" button or the "X" (close) button, a request is sent to the ProductController containing all the product ids from the product list displayed on the page. 

image.png.034de895218f8d2b20602507db945e6e.png

It also changes the url in the search bar, but remains on the current page.

Also, it adds quantity divs to product miniatures, where they should not be....

image.png.45aaa78f31f6ed8a6961f1651b250b16.png

Steps trying to solve:

I deactivated custom modules.

Cleared cache (manually + from BO).

Upgrade ps_shoppingcart.

Reset ps_shoppingcart.

Same behaviour...

 

Solved with bad hardcoding practice, but I really need help because I am practically remaking modal closing behaviour, since the jQuery based one sends request to ProductController: 

themes/modules/ph_shoppingcart/modal.tpl removed:

data-dismiss="modal"

 

themes/modules/ph_shoppingcart/modal.tpl added:

     custom-modal class to "Continue Shopping" button and "X" button

<script> $(document).click('.custom-modal-close', function() { $('#blockcart-modal').remove(); $('.modal-backdrop').remove(); $('body').removeClass('modal-open'); }); </script>

 

On http://demo.prestashop.com/ no request in made when the "Added to cart" modal is closed

 

I would really appreciate some input here. Even  the place where clicking on a data-dismiss modal element could send this request. Thank you!

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

Hi.

I do not understand everything.
You can sell to make a screen page with your problem.
Please make a screen and draw an arrow where the problem is.
Thank you

Link to comment
Share on other sites

@Guest    Thank you for your response and I am sorry if I wasn't a good explainer. When I close the "Added to cart" confirmation modal, a request is sent to the ProductController, as above (my post). That changes the URL with a product URL, and refreshes every product miniature.

This never happened until today.

I am not able to find the AJAX that is activated on modal closing that could send that request.

As tested on PS 1.7 demo, when closing the confirmation modal it just dissapears, no GET request is made to ProductController. 

 

 

 image.png.0d5c9cac23ed4eb75a86020bd85d4489.png

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

Great, I understand.
Can you please add the exact version of Prestashop and whether the used template is purchased or it is a modification of the default template.

Link to comment
Share on other sites

I understand, I would have to look at your problem in person. Was the cache cleared and was the template recompile?

Unfortunately, I no longer have any free time today.
We can contact you tomorrow to solve your problem.

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

  • 5 months later...

Hello,

I have the same issue. Some sliders are making conflict with ps_shoppingcart module and when closing cart modal popup it is changing the real image of the current product with wrong one. Did you manage to solve it?

Link to comment
Share on other sites

 

@lozaria

You can try the solution from the original post:

themes/modules/ps_shoppingcart/modal.tpl removed:

data-dismiss="modal"

 

themes/modules/ps_shoppingcart/modal.tpl added:

 1. custom-modal class to "Continue Shopping" button and "X" button

2. <script> $(document).click('.custom-modal-close', function() { $('#blockcart-modal').remove(); $('.modal-backdrop').remove(); $('body').removeClass('modal-open'); }); </script>

Let me know if you manage to get it work. Remember to clear cache after applying these changes

Edited by butuemi
Typo (see edit history)
  • Like 2
  • Thanks 1
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...