Hello,
On some orders, I try to tracking or even edit the address of the error 500 I debug and I have this problem.
Can anyone help?
Prestashop 1.7.6.7
Attempted to call an undefined method named "getProducts" of class "stdClass".
in classes/order/Order.php (line 2641)
// 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) {
------------------------------------------------------------------------------------------------------------------------
CRITICAL phpCall to undefined method stdClass::getProducts()
CRITICAL requestUncaught PHP Exception Symfony\Component\Debug\Exception\UndefinedMethodException: "Attempted to call an undefined method named "getProducts" of class "stdClass"." at /classes/order/Order.php line 2641