Order\Collection
Magento\Sales\Model\ResourceModel\Order\Collection
What it does
This class manages collections of sales orders in Magento 2, allowing developers to retrieve, filter, and search order data from the database.
It provides methods to add billing/shipping address information, filter by customer fields, count items, and search across multiple order attributes.
Developers use this when they need to display or process multiple orders, such as in admin grids, customer order history pages, or custom order reports.
Public Methods
- addItemCountExpr()
- getSelectCountSql()
- addAddressFields()
- addFieldToSearchFilter()
- addAttributeToSearchFilter()
- addBillingAgreementsFilter()