order history

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!
User avatar
GülsümAkça
Posts: 57
Joined: 20 Nov 2020, 13:30

order history

Post by GülsümAkça » 17 Dec 2020, 09:51

I want to get the delivery status and total order price in the templates/account/history/list-body-standard.php file. Currently there is a function related to the delivery status, but it doesnt work. how can I do that.

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

Re: order history

Post by aimeos » 18 Dec 2020, 08:39

The delivery status is available using

Code: Select all

$orderItem->getStatusDelivery()
beginning from here: https://github.com/aimeos/ai-client-htm ... d.php#L100

The order total value is not because the order base object is only availabe in the order-body-standard.php template. To add that data to the list template, you have to create a decorator that implements addData(), calls addData() of the underlying object and uses the order items assigned to the view (https://github.com/aimeos/ai-client-htm ... d.php#L218) to fetch the order base items from the storage.

You can find documentation for decorators here:
https://aimeos.org/docs/latest/frontend ... omponents/
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
GülsümAkça
Posts: 57
Joined: 20 Nov 2020, 13:30

Re: order history

Post by GülsümAkça » 25 Dec 2020, 07:33

Thank you for your answer. Does the getDeliveryStatus() function work? even if the delivery status is updated, it doesnt appear in the list order section on aimeos demo site

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

Re: order history

Post by aimeos » 29 Dec 2020, 08:40

In the account/history list template, the delivery status is only displayed if the delivery date is also set:
https://github.com/aimeos/ai-client-htm ... d.php#L159
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply