Skip to main content

Questions tagged [order-collection]

Questions related to Magento order collections.

0 votes
2 answers
29 views

We would like to create our own getOrderCollectionFactory based on Magento\Sales\Order\History, with only orders containing specify Attribute Set. How can we extend the addFieldToFilter part? public ...
JGeer's user avatar
  • 1,420
2 votes
2 answers
795 views

can someone explain for me the this attribute used in array? $order = $this->createObject(Order::class) ->getCollection() ->addFieldToFilter('...
Bayzel's user avatar
  • 187
0 votes
0 answers
151 views

I want to get the two order collections by new and older customers for the current month. Please suggest the proper way, I just want the count of orders, Not need all the details of an order. Thanks ...
Kishor Thummar's user avatar
2 votes
1 answer
479 views

I need the get the items' product id from certain orders. One way to do it is to simply call the items inside the order loop: $orderCollection = $this->orderCollectionFactory->create() ->...
Lou Nik's user avatar
  • 527
0 votes
0 answers
161 views

I am implementing a feature, where I need to filter the order item list in order admin page. I have checked and found the list is getting from method getItemsCollection(). But when I am trying to ...
Gaurav Agrawal's user avatar
0 votes
1 answer
62 views

how to fusion this instructions: $collection->addFieldToFilter('updated_at', ['from' => $from]) ->addFieldToFilter('updated_at', ['to' => $to]) or $collection->...
Abdallah JARRAY's user avatar
0 votes
1 answer
1k views

I want to retrieve orders of a specific store? Is there any way to achieve it. R&D just gave me methods to get store id from order or get store/customer information using order. But i have not ...
VishalParkash's user avatar
0 votes
1 answer
1k views

I would like to know how to filter order collection by using a product item name in magento 2? $collection = $this->_orderCollectionFactory->create()->addAttributeToSelect('*'); $collection-&...
Pavithra's user avatar
  • 593
0 votes
3 answers
1k views

I have successfully got the order details and below is my code to get the details. Now, I need to get the ordered item details. Please guide $collection = $this->_orderCollectionFactory->create()...
MagentoDev's user avatar
0 votes
1 answer
441 views

I'm trying to get order purchase point (store where it was purchased), I have tried this: $order->getPurchasePoint(); It did not work, any ideas? here is my code public function execute() { ...
Oscar Vazquez's user avatar
1 vote
1 answer
473 views

I need to get the order id by increment id. I would normally do this by calling the order factory: /* Magento\Sales\Model\OrderFactory */ $order = $this->_orderFactory->loadByIncrementId($...
Lou Nik's user avatar
  • 527
0 votes
1 answer
165 views

I am working with an observer where I have to disable a payment method if the user has no existing order, and show it if there is at least one order. I am trying something like this but I am not able ...
Shoaib Fareed's user avatar
0 votes
2 answers
2k views

I need to filter order collection based on payment method. I tried the following: $customerOrderCollection = $this->orderCollectionFactory->create()->addFieldToFilter('customer_id', $...
Toji's user avatar
  • 620
0 votes
1 answer
102 views

I have a custom attribute delivery_date set for my orders however I want to create a collection that groups all these dates together and tells me the order count for each date. I have attempted with ...
harri's user avatar
  • 5,565
0 votes
1 answer
368 views

I have created a custom attribute in product and saved a string in that value and I want if some one order those product of same value string i want that collection of product. So, i want to use \...
Prits's user avatar
  • 664

15 30 50 per page