List OrderItems displayes only 10 entrys

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Sib315
Posts: 2
Joined: 29 Oct 2021, 13:16

List OrderItems displayes only 10 entrys

Post by Sib315 » 29 Oct 2021, 13:26

Is it possible to show more orderitems in the customer profile.
Currently only 10 orders are displayed.
And with $this->get( 'listsOrderItems', [] ) you only get 10 entries.

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

Re: List OrderItems displayes only 10 entrys

Post by aimeos » 31 Oct 2021, 09:16

There's an effective limit of 100 items in the order history list and you can overwrite this method to adapt the limit (max. 500 at once due to security reasons):
https://github.com/aimeos/ai-client-htm ... #L217-L218

Code: Select all

$view->listsOrderItems = $cntl->sort( '-order.id' )->slice( 0, 500 )->search();
The better alternative is to add a paginator so not all orders are fetched at once which can be slow. Here you can find the methods available in the order controller:
https://github.com/aimeos/ai-controller ... /Iface.php
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply