Vee.K727 Posted August 6, 2020 Share Posted August 6, 2020 (edited) Hi. This part has been working fine until now and nothing has changed that would be relevant for this error to appear. I'm using PS 1.7.6.5 and I have products with combinations. In the screenshots, you can see I have 3 combinations in this product. In the front end though, only 2 appear and clicking on it brings up the red error box saying "An error occurred while processing your request" and doesn't switch variants. In the network tab, I see an ajax request is sent on clicking a variant but the response is a 500 server error showing an error in Mysql statement. Can someone help me with this? Edit: The third combi was not appearing because of an image issue. I've resolved that. But the error on changing it remains. Edited August 6, 2020 by Vee.K727 Added more info (see edit history) Link to comment Share on other sites More sharing options...
musicmaster Posted August 6, 2020 Share Posted August 6, 2020 The error in the Mysql code is that "pac.id_attribute in ()" contains these empty brackets. It might be that your javascript is sending the wrong text to the Ajax request. Link to comment Share on other sites More sharing options...
Vee.K727 Posted August 6, 2020 Author Share Posted August 6, 2020 Dude I'm not even sure where to begin looking. Can you be a bit more specific? This is not "my" javascript, this is all core prestashop features which is very hard to understand. Can you tell me whats supposed to be in the brackets and where does it come from? Link to comment Share on other sites More sharing options...
musicmaster Posted August 6, 2020 Share Posted August 6, 2020 Sorry, I can't. If you are capable of seeing the result of an ajax operation you should also be capable of seeing what is sent to that operation. It is almost the same tab. In your first picture I see "0 of 3 selected". That could be the cause of the error. It is up to your creativity to find out. Link to comment Share on other sites More sharing options...
przemko Posted October 13, 2020 Share Posted October 13, 2020 Hi all, Hope you will be able to help me finding (and fixing) a bug that seems to be the same as described above. I have a shop (version 1.7.6.5, PHP 7.2, default/classic prestashop template) and everything works fine.... except product variants. When a user opens a product page to select different color of that product, the page displays a message "An error occurred while processing your request" under the "Add to cart" button. The inspect console tells that the server returns "500 Sever Error", saying "Oops, something went wrong." Log on the server says "POST /index.php?controller=product&token=7c5103bec05826f1beae2462fd282f67&id_product=102&id_customization=0&group%5B2%5D=8&qty=1 HTTP/2" 500 Does anybody know what can be the reason and how to fix this? I'm not sure where to look for a reason and I'm not too skilled to debug and analyze the source code. I can implement a fix in code if somebody will tell where to fix and what. Link to comment Share on other sites More sharing options...
musicmaster Posted October 13, 2020 Share Posted October 13, 2020 It looks like you haven't enabled debug mode 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