>where('sop.method = ?',$paymentMethod) //E.g: ccsave Public function getOrderCollectionPaymentMethod($paymentMethod) Down here are how we can get all order filter by customer: While developing Magento 2 extensions at the frontend like My Account, you might need to display existing customer orders in a grid in the backend. Method 2: Get All Order Collection Filter by Customer $collection = $this->_orderCollectionFactory()->create($customerId) Public function getOrderCollectionBåustomerId($customerId) >addFieldToFilter($field, $condition) //Add condition if you wish $collection = $this->_orderCollectionFactory->create() _orderCollectionFactory = $orderCollectionFactory
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |