Get Base Order from Order item
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
-
- Expert
- Posts: 274
- Joined: 27 Jun 2019, 16:19
Get Base Order from Order item
Hello, on the front-end, customer profile we have list of orders. On the view file there is $orderItems variable and it is array of \Aimeos\MShop\Order\Item\Standard. But how can I get \Aimeos\MShop\Order\Base\Item\Standard from Order item ? In the mshop_order table there is baseid filed and it is linked to mshop_order_base table. But how can I get order_base item from order item ? Order object has getBaseId() method. So I have collect all base ids and get them from db .... ? Not comfortable.. ((
what is the right way ?
what is the right way ?
Re: Get Base Order from Order item
Right now, you have to loop over the order items and get the base IDs to fetch the order base items (baskets) afterwards.
We are currently in the process of merging mshop_order and mshop_order_base tables so in 2020.x things will get easier.
We are currently in the process of merging mshop_order and mshop_order_base tables so in 2020.x things will get easier.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star