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 [sales-order]

Denotes questions related to Magento Sales module's order functionality.

23
votes
4answers
14k views

Magento 2 - Create order using REST API

I need to use the Magento REST API to create an order from a mobile client. In my case, mobile side will implement the payment directly using PayPal SDK. What I need to do is to create an order by ...
18
votes
2answers
6k views

Magento 1.9.2.0: table “sales_flat_order_grid” contains extra space in customer's name value

In admin panel, when I want to search the orders based on customers name, I have to add 2 spaces between the first name and last name. When I looked at the value in Inspect element window, I noticed ...
11
votes
1answer
9k views

Magento 2 How to create new order attribute programatically

I've been searching the web on how to create an order attribute (if thats whats called), essentially I just want a new database column to appear in the sales_order database, obviously I could create ...
10
votes
4answers
21k views

addAttributeToSelect for multiple fields not working

I am trying to get the user orders history, used the following query and its working fine. But its returning all the order related fields from table $collection = Mage::getModel("sales/order")...
10
votes
2answers
17k views

How to overwrite core template files from a custom module?

I want to overwrite two files. Namely the view.phtml and print.phtml of sales orders. (path: app/design/frontend/base/default/template/sales/order/) I am creating a module in which I want to create a ...
9
votes
5answers
16k views

Magento 2: How to update order status programmatically in custom module?

$orderId = 1; $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $order = $objectManager->create('\Magento\Sales\Model\Order')->load($orderId); $order->setState("...
9
votes
3answers
11k views

Magento Order Number Issue

I have got a strange issue with Order Number in Magento. Recently when one order was placed on my website the Order number came was 100000350,Ideally it should have been 100000370 as my previous ...
8
votes
1answer
6k views

Difference Between Sales Quote and Sales Quote Address

I am looking which collect_totals observer I can use. There are two observers, sales_quote_collect_totals_before and sales_quote_address_collect_totals_before. They can be found in /app/code/core/...
8
votes
2answers
4k views

How to programmatically place order with custom options in Magento 2?

Here is the data that I'm using: Array ( [products] => Array ( [0] => Array ( [product_id] => 6 [qty] => 1 ...
8
votes
2answers
7k views

How to get collection of orders which can be shipped?

I need orders which are not shipped yet or are partially shipped. I am using below code to get orders which can be shipped. foreach ($orderIds as $orderId) { $order = Mage::getModel('sales/order')...
8
votes
1answer
4k views

Magento 2 Filter not working while Custom column added on Sales Grid Using Ui Component

I have added Custom column track_number into sales>>Order grid at Backend. <vendor_name>/Sales/view/adminhtml/ui_component/sales_order_grid.xml <?xml version="1.0" encoding="UTF-8"?> ...
7
votes
3answers
5k views

Add More Mass action in Order grid in magento2

I want to create delete order functionality in magento2, but i am not able to add mass action in order grid. please help me how to create delete order functionality in magento2. Please help me if any ...
7
votes
7answers
10k views

How do I add a customer's email to the sales invoice?

Essentially looking to add customer email to our customer's receipts (invoices) and sales order emails that are generated to dispatch/couriers as well etc. With a bit of searching I've established ...
7
votes
4answers
10k views

Get Customer information from order Magento 2

I want to retrieve customer information from sales order view observer in adminhtml section, currently i only know how to retrieve order in that observer like this: namespace Namespace\Module\Block\...
7
votes
4answers
1k views

Call to undefined method Mage_Directory_Helper_Data::getRegionJsonByStore() in admin sales order create

This is very strange. I disabled both app/community and app/local as well as replaced app/core with stock Magento files and yet I keep getting the following error: Call to undefined method ...
7
votes
2answers
6k views

Magento 2: How to override Adminhtml “Shipping & Handling Information” Information

I'm following https://ranasohel.me/2015/10/02/how-to-overwrite-sales-view-order-phtml-file-in-magento2/ I would like to override magento\vendor\magento\module-shipping\view\adminhtml\templates\order\...
7
votes
3answers
2k views

Paypal orders being cancelled randomly

I have noticed Paypal orders on my site at random get cancelled even though the customer paid and completed the transaction. Payment information gets populated and I can see the ipn registered message ...
7
votes
1answer
3k views

Right magento observer for order paid

I'm trying to send orders to a third-party after and ONLY after an order has been paid and has now been set to 'Processing' as status. What's the best observer to use to set up this to work for all ...
7
votes
2answers
319 views

Email not send when put order for recurring profile products

I placed the order for recurring profile products. New order email not received. If I put the order for normal products, I received the email.How to fix this. Is any option in backend to enable this?
7
votes
0answers
119 views

Replicate order summary block Magento 2

I want to add order summary at checkout success page, I want to replicate the existing order summary block and template file whether its from backend or frontend. Which block and template file to ...
6
votes
3answers
26k views

Event before save order or place order in magento 1.9.1.1

Get event before place order or save new order. I have tried the sales_order_save_before event but I didn't get any data. Below is my code, In config.xml: <sales_order_save_before> <...
6
votes
1answer
2k views

Export a field from custom model grid with a diferent render to Csv

I created a custom column on sales order grid. It works as well but a used a custom render on a field (like this). When I export the grid to CSV, the file contains the raw value, but I need apply ...
6
votes
1answer
7k views

What's the best event/way to listen for all order state changes in Magento 2?

I want to observe every order state change and react depending on the old and new status. What is the best way to accomplish this in Magento 2? It looks like there is the event ...
6
votes
2answers
433 views

Hide completed orders from sales/orders

In sales/orders is it possible to hide completed orders ? using something like filters. or can I filter the status column with more than one status ?
6
votes
1answer
514 views

“discount_tax_compensation_amount” attribute in Sales Order Item (Magento 2)

I see there is discount_tax_compensation_amount field in the sales_order_item table. For what purposes this attribute is?
6
votes
3answers
3k views

Magento2: frontend event is not working (sales_order_place_after)

I am catching sales_order_place_after event in etc/adminhtml/events.xml everything working fine.. But same is not working while trying to catch in etc/frontend/events.xml. also tried to catch the ...
6
votes
2answers
2k views

How to add shipped date to admin sales order grid

I am stuck with adding new column(Shipped date) to sales order admin grid. I copied the file Grid.php from app/code/core/Mage/Adminhtml/Block/Sales/Order to app/code/local/Mage/Adminhtml/Block/Sales/...
6
votes
4answers
578 views

How can I create Admin(Manual) order without the Products available in the Website?

I need to create manual(Admin) order, without the products present in the website, I mean order create for not available products in website. How to achieve using any custom options?
6
votes
1answer
663 views

Redirected to store base URL instead of custom admin URL

In case of Custom Admin URL (in System -> [Advanced] Admin -> Admin Base URL) is set to something like http://mytreasure.store.com after creation of order or invoicing it Magento redirects back to the ...
6
votes
2answers
690 views

How to capture creditcard payment using sales order REST API magento 2?

How to create sales order with payflow pro payment using REST api magento 2. Order placed successfully with sales order api but payment doesn't not set using order api. I want to pass test credit ...
5
votes
1answer
8k views

How to Get order increment id using order id in Magento 2

Can anyone please tell me How to Get order increment id using order id in Magento 2? Thanks.
5
votes
2answers
4k views

Convert quote to order generating empty order

I'm changing the Magento to not save automatically orders as pending at checkout. I want to save only orders that were paid, and if it fails back to the cart with an error message in the payment. I ...
5
votes
1answer
369 views

Sales flat order: ext_customer_id, ext_order_id

Does anyone know what the purpose is of the order attributes "ext_customer_id" and "ext_order_id"? The Magento code appears to introduce these attributes and they appear on each order, but never ...
5
votes
2answers
4k views

How to get last order status history comment and order status Magento 2

I need to change the order status and order status history comment based on the last value of the status, currently i've set order status and comment status like this: $event = $observer->getEvent(...
5
votes
2answers
534 views

How to add new item (product) into existing order programmatically in Magento 2

I have created one virtual product in my Magento2 website. Now, I want to add it programmatically to the existing customer orders on some occasions with its custom price and name. Can someone please ...
5
votes
1answer
2k views

Magento2 - Customize Order Numbers - Overriding: Magento\SalesSequence\Model\Sequence

Magento 2 is using the class Magento\SalesSequence\Model\Sequence to generate a reserved order number prior to actually placing an order. I would like to override this class to create custom increment ...
5
votes
1answer
575 views

Magento-2 : How to display custom field just after payment method list and save on place order

I want to display one text area, just after payment method list, on checkout page. Text area value should be saved on place order. Saved value also need to be displayed in Admin >> sales >> order >> ...
5
votes
1answer
148 views

Add Name + Lastname in sales order grid

What I would like to achieve is to show Account Name + Lastname in sales order grid (like it happens in customer grid). These are files I created: Cpu/CustomGrid/etc/config.xml <config> &...
5
votes
1answer
1k views

How to create shipment using API (SOAP V1) with specific items in it?

I'm looking to find how should array of items look like. I have found an example here: $orderIncrementId = '200000006'; $itemsQty = array('3' => '3', '4' => '5'); $result = $proxy->call( ...
5
votes
1answer
73 views

This order no longer exists for all sales orders > 1 month

i just realized that i cannot open any SO which is created more than 1 month ago, i'm getting error This order no longer exists : respective records exist in tables sales_order and ...
5
votes
0answers
576 views

customers cancel return products in my account page- Magento 2

My requirement is adding cancel and return option in customer account page. add cancel option after place order. add return option after delivered. I am wondering it is a very essential option but ...
5
votes
0answers
378 views

Magento send orders email to random [closed]

At random times, magento sends order emails to random customers who had nothing to do with that order. The order placed by the customer id 1 for example can get also sent to the customer with id 20 ...
4
votes
2answers
11k views

Magento 2 : load order by id in customer account order view

In customer account order view page I added a Block and an associated phtml file. Inside this phtml, I would like to load the order to access some informations. NB: the block is added dynamically and ...
4
votes
4answers
9k views

Magento 2: Get quantity item from the order

I'm trying to build a custom payment module for magento 2 and i have a function in my payment module that is called on the success page. The problem is that i can't get the items quantity. I can get ...
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 ...
4
votes
1answer
26k views

magento 1.9: Get order & customer details [closed]

I am creating a extension on sales_order_place_after event observer & i want to get order & customer Details with following code but i don't have any idea to do this config.xml <?xml ...
4
votes
5answers
14k views

Magento's sales orders report is wrong

We use the Sales orders report to know how many bucks we earn. For this reason we update the statistic every day by a cron job. But the report has wrong values. Nothing it's equal to the values that ...
4
votes
3answers
4k views

Magento 2 - sales_order_place_after not returning Order ID

I have created an event for sales_order_place_after event. This doesn't return Order Id. However, it returns Increment ID public function execute(Observer $observer) { $order = $...
4
votes
2answers
6k views

Get Product ID from Customer Order

I am setting up Google trusted stores and I am stuck on one problem which is not compulsory but I would rather it was working. I need to get the product ID of the item the customer has ordered So ...
4
votes
3answers
4k views

Why I cannot create an invoice from an completed order

I am using Magento 1.7.0.2 and I have a problem with some orders. They are paid by CC and the order is now Completed but I can not create an Invoice. I can not see the invoice button on Order and I ...