I need to get all orders on the sales order history page without any limit I need to get the orders. In magentoMagento 2.3.
I had tried the below code using the OrderCollectionFactory but I am getting the error
if (!$this->orders) {
$this->orders = $this->orderCollectionFactory->create($customerIds)->addFieldToSelect(
'*'
)->addFieldToFilter(
'status',
['in' => $this->_orderConfig->getVisibleOnFrontStatuses()]
);
$this->orders->getSelect()
->joinLeft(
["sop" => "amt_sales_order_payment"],
'main_table.entity_id = sop.parent_id',
['po_number']
)
->where('sop.po_number LIKE ?',$po_number);
$this->orders->setOrder(
'ext_order_id',
'desc'
);
}
Uncaught Error: Call to a member function create() on null in /var/www/html/app/code/Sm/SalesOrderGridTable/Block/Order/History.php:139 Stack trace: #0