Jump to content

Problem with customer address edit


bartes1987

Recommended Posts

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

  • 10 months later...

@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

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.

  • Thanks 1
Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

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

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