bartes1987 Posted April 22, 2021 Share Posted April 22, 2021 If I try to edit the customer address from the order page I get: "The server returned a "500 Internal Server Error". In server logs I have: "mod_fcgid: stderr: PHP Warning: Creating default object from empty value in .../classes/order/Order.php on line 2536" Line 2536 is: $new_cart->id_address_delivery = (int) $this->id_address_delivery; Despite the error the changes in the address I make are saving sucessfully. Any ideas? Link to comment Share on other sites More sharing options...
led22 Posted March 10, 2022 Share Posted March 10, 2022 Good evening @bartes1987, I am in exactly the same situation as you. I have an order in which I tried to change some billing address information and I got the error. Did you manage to solve it? Thank you. Link to comment Share on other sites More sharing options...
Ress Posted March 10, 2022 Share Posted March 10, 2022 What version of prestashop? Link to comment Share on other sites More sharing options...
led22 Posted March 11, 2022 Share Posted March 11, 2022 hace 11 horas, Ress dijo: What version of prestashop? 1.7.6.5 Link to comment Share on other sites More sharing options...
Ress Posted March 11, 2022 Share Posted March 11, 2022 Can you try to do this with the debugger on? Because I don't think error 500 is from that warning. Link to comment Share on other sites More sharing options...
led22 Posted March 14, 2022 Share Posted March 14, 2022 @Ress Attempted to call an undefined method named "getProducts" of class "stdClass". in classes/order/Order.php (line 2641) 2641 = foreach // assign id_carrier $new_cart->id_carrier = (int) $this->id_carrier; //remove all products : cart (maybe change in the meantime) foreach ($new_cart->getProducts() as $product) { $new_cart->deleteProduct((int) $product['id_product'], (int) $product['id_product_attribute']); } // add real order products foreach ($this->getProducts() as $product) { Link to comment Share on other sites More sharing options...
Ress Posted March 14, 2022 Share Posted March 14, 2022 The code enters your function, because you have checked, in the settings, the option to recalculate the transport, in case the order is modified. After Disabling that option, you may no longer have this error, but you should still check exactly why this is happening. That piece of code is ok, it is not modified, it is necessary to see in more detail where exactly the problem comes from. 1 Link to comment Share on other sites More sharing options...
led22 Posted March 15, 2022 Share Posted March 15, 2022 hace 17 horas, Ress dijo: The code enters your function, because you have checked, in the settings, the option to recalculate the transport, in case the order is modified. After Disabling that option, you may no longer have this error, but you should still check exactly why this is happening. That piece of code is ok, it is not modified, it is necessary to see in more detail where exactly the problem comes from. Indeed, if I deactivate this option, it works fine. I don't remember activating that option before, is it possible that it has to do with the one page checkout module we have? If I deactivate this option, can I have problems calculating shipping costs when increasing or decreasing the number of items in an order in the shopping cart? Regards. 1 Link to comment Share on other sites More sharing options...
Ress Posted March 16, 2022 Share Posted March 16, 2022 I don't remember activating that option before, is it possible that it has to do with the one page checkout module we have? I don't think I saw in a checkout module to change that setting. If I deactivate this option, can I have problems calculating shipping costs when increasing or decreasing the number of items in an order in the shopping cart? That option only applies to backend order changes. 1 Link to comment Share on other sites More sharing options...
led22 Posted March 16, 2022 Share Posted March 16, 2022 En 14/3/2022 a las 10:41 PM, Ress dijo: The code enters your function, because you have checked, in the settings, the option to recalculate the transport, in case the order is modified. After Disabling that option, you may no longer have this error, but you should still check exactly why this is happening. That piece of code is ok, it is not modified, it is necessary to see in more detail where exactly the problem comes from. I understand that now the search for the solution to the error is complicated to locate. 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