Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [order-collection]

Questions related to Magento order collections.

0
votes
3answers
26 views

Magento1 Get Item Details From Order Collection

in magento 1.9 i am working on order collection i am getting order collection successfully using below code now i want to get item details from order how i can get this .i am using this collection $...
3
votes
2answers
43 views

Magento 2.3.0 How to add store filter in searchCriteriaBuilder

In my custom module, I am trying to add store filter in orderRepository using searchCriteriaBuilder but it is throwing an error like below. 1 exception(s): Exception #0 (Exception): Warning: PDO::...
0
votes
2answers
31 views

How to get the items orders by the customer in the order collection?

I need to get the collection of orders with the the items ordered by using the customer ID. But I am not getting the items ordered in my collection. Please help. $objectManager = \Magento\Framework\...
1
vote
1answer
49 views

Magento 2.3.0 How to get product image from order item collection

I would like to get a product image from order items collection. How can I get a product thumbnail image? Below is my custom order item collection code : public function getEmailLogOrders() { $...
1
vote
2answers
81 views

Get collection of orders excluding cancelled order in Magento 2

I have got order collection with the following code: $orders = $objectManager->create('Magento\Sales\Model\Order')->getCollection(); Which is working fine. Problem is that it returns all types ...
1
vote
2answers
22 views

Get billing address line 1 and line 2 in order collection: Magento 2

I am trying to get billing address line 1 and line 2 with city and state in order collection. Here is my code: $oid = 1; $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $order =...
3
votes
3answers
141 views

Get order collection by order id in Magento 2?

I am trying to get order collection by order id in Magento 2. Here is my code: $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $orders = $objectManager->create('Magento\...
0
votes
0answers
33 views

Data Not Set in admin Grid in magento2

I am Filter the Order Collection. Code give as protected function searchResultToOutput(SearchResultInterface $searchResult) { $arrItems = []; $arrItems['items'] = []; foreach ($...
1
vote
2answers
85 views

How to get order collection filter with customer_is_guest and email (Magento 2)

How to get order id from collection with filter customer_is_guest = 1 and customer email $order_collection = $objectManager->create('Magento\Sales\Model\Order')->getCollection()->...
0
votes
1answer
226 views

Magento 2 : How to get order collection group by customer?

To get order collection by customer wise i.e.., customer A and customer B have placed order and it should retrieve by customer wise per collection? public function getOrdersByCustomer() { $...
0
votes
2answers
209 views

Filter sales/order collection according to country

I would like to filter out my home country (GB or United Kingdom) from the following sales/order collection. How can this be done? $orders = Mage::getModel('sales/order')->getCollection() ...
1
vote
0answers
68 views

{M1) Product collection sort order by views for Most Viewed Products

Does anyone know how to order by views (ascending/descending) a product collection when working with most viewed products? I am using this following code: $_productCollection = Mage::...
0
votes
0answers
21 views

Magento v1.9 Customer Edit Tab - Orders Collection

What Magento collection instance is loaded in the Mage_Adminhtml_Block_Customer_Edit_Tab_Orders grid? I am trying to use an event observer to modify the collection before load. The event being ...
1
vote
2answers
114 views

Magento 2 - Get orders that were completed x days ago

I'm trying to get all orders that were completed a certain number of days ago using the below code: protected $searchCriteria; public function __construct( \Magento\Framework\App\Action\Context ...
2
votes
1answer
38 views

Order collection not showing the order that have been invoiced

I try to retrieve all the order collections, but when I observe by looping the collections and print the order id, I notice the order that has been invoiced is not inside the collection. $collections ...
0
votes
3answers
1k views

Orders collection - how to get all in the time range (current day)

Trying to gather all the orders (current day) and sum totals Updated: $format = Mage::getModel('core/date')->date('Y/m/d'); $from = $format.' 00:00:00'; $now = Mage::getModel('core/...
2
votes
1answer
644 views

PayPal Automatically Update Payment Review Orders

If a customer pays via PayPal and his account is not covered, the order in Magento is in the state "payment_review". You can then: Accept the payment manually. Deny the payment. Get a payment update. ...
4
votes
5answers
4k views

Column 'store_id' in where clause is ambiguous when adding custom order attribute to grid and changing store

I have created a custom order attribute and I am now able to show it in the sales order grid; my previous question: Adding custom sales order attribute to order grid If I were to change the drop down ...