How to get orders with their products

Help for integrating the Laravel package
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!
Dhara1510
Posts: 15
Joined: 27 Apr 2019, 05:36

Re: How to get orders with their products

Post by Dhara1510 » 09 May 2019, 09:44

I am using latest "dev-master" version. Can you please guide me how to get latest created order for user?
Last edited by Dhara1510 on 09 May 2019, 09:49, edited 1 time in total.

Dhara1510
Posts: 15
Joined: 27 Apr 2019, 05:36

Re: How to get orders with their products

Post by Dhara1510 » 09 May 2019, 09:49

I am using latest "dev-master" version. Can you please guide me how to get latest created order for user?

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: How to get orders with their products

Post by aimeos » 09 May 2019, 09:50

You can use this if the user is logged in:

Code: Select all

use \Aimeos\Shop\Facades\Order;

if( ( $item = current( Order::sort('-order.id')->slice(0, 1)->search() ) !== false ) {
    // ...
}
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Dhara1510
Posts: 15
Joined: 27 Apr 2019, 05:36

Re: How to get orders with their products

Post by Dhara1510 » 09 May 2019, 10:02

Thank you sir. I will apply it and let you know if i need your help

Post Reply