Search the Community
Showing results for tags 'cart_id'.
-
Hi All, I'm trying to get customer details and shipping address after the orders are processed from selective carts. I've got the cart Id to start with. But I'm having difficulty retrieving the customer's first name, last, name and shipping address. I've tried the following so far. $cart_id = $value['cart_id']; $result = false; $order = Order::getOrderByCartId((int)($cart_id)); $order_details = OrderDetail::getList((int)$order); if(isset($order_details[0])) { $order_id = $order_details[0]['id_order']; $customer = new Customer ($order_id); if (!Validate::isLoadedObject($customer)) { print_r($customer); } } The above code is giving me the entire customer object. But I'm not sure how to get the firstname, lastname, address and email from it. Appreciate you taking out time for this. Regards B
- 2 replies
-
- customer details
- cart_id
-
(and 2 more)
Tagged with:
-
So, this happens for a few days a week and suddenly it's fixed by itself? I need to know what's the problem so I can fix it. When I want to add an order for a client in the BO I can't add products, when I search for a product I get a red error saying: 'Product can't be added to the shopping cart'. When it for some reason DOES add, then I still can't make the order. When I submit I get a red error: 'cart_id is required'. Does anyone know what this is? Have been looking for days now.. Thank you!
-
Hi i m still looking for a way to get the cart_id when i create an order in the back office. in front, i get it in the context, $this->context->cart->id but in BO, if i print_r($this->context) the cart id doesn t appear to be stored here. does anybody know how i could access this id? it s created as when i look the DB, the cart is here... thanks for your help ^^