PrestashopLearner Posted December 3, 2020 Share Posted December 3, 2020 (edited) 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. 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.... 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 December 3, 2020 by PrestashopLearner (see edit history) Link to comment Share on other sites More sharing options...
Guest Posted December 3, 2020 Share Posted December 3, 2020 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 More sharing options...
PrestashopLearner Posted December 3, 2020 Author Share Posted December 3, 2020 (edited) @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. Edited December 3, 2020 by PrestashopLearner (see edit history) Link to comment Share on other sites More sharing options...
Guest Posted December 3, 2020 Share Posted December 3, 2020 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 More sharing options...
PrestashopLearner Posted December 3, 2020 Author Share Posted December 3, 2020 Prestashop Version: 1.7.6.0 The only modification is that I have Add To Cart button in product miniature, no quick view. This worked with no issue whatsoever. No hardcoded ajax to ProductController in ps_shoppingcart or any other place for that matter. Link to comment Share on other sites More sharing options...
Guest Posted December 3, 2020 Share Posted December 3, 2020 (edited) 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 December 3, 2020 by Guest (see edit history) Link to comment Share on other sites More sharing options...
PrestashopLearner Posted December 3, 2020 Author Share Posted December 3, 2020 Yes, it was. Cached clear from Performance, but also tried manually. No luck... So no idea where could an Ajax call be triggered to ProductController on modal close? Link to comment Share on other sites More sharing options...
lozaria Posted May 16, 2021 Share Posted May 16, 2021 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 More sharing options...
butuemi Posted May 16, 2021 Share Posted May 16, 2021 (edited) @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 May 16, 2021 by butuemi Typo (see edit history) 2 1 Link to comment Share on other sites More sharing options...
lozaria Posted May 16, 2021 Share Posted May 16, 2021 Thank you very much! Works like a charm now! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now