Questions tagged [sales-order]

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

Filter by
Sorted by
Tagged with
30 votes
5 answers
37k views

How to create order using REST API?

I need to use the Magento REST API to create an order from a mobile client. In my case, the mobile side will implement the payment directly using PayPal SDK. What I need to do is to create an order by ...
TFS's user avatar
  • 4,319
19 votes
2 answers
8k 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 ...
Zinat's user avatar
  • 2,069
15 votes
3 answers
21k 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 ...
André Ferraz's user avatar
14 votes
6 answers
53k 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("...
Rahul Katoch's user avatar
  • 1,119
12 votes
3 answers
20k 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.
Magento Team's user avatar
10 votes
4 answers
29k 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")...
AnNaMaLaI's user avatar
  • 205
10 votes
2 answers
19k 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 ...
Rajan Faldu's user avatar
10 votes
2 answers
4k 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?
Alex Gusev's user avatar
  • 2,009
10 votes
1 answer
11k 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"?> ...
Ronak Chauhan's user avatar
10 votes
1 answer
318 views

How to rename order shipments name in customer dashboard frontend?

I am using Magento 2.1 I want to rename order shipments name and switch order shipments first then invoice.
kiran's user avatar
  • 599
9 votes
3 answers
16k 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 ...
Dexter's user avatar
  • 3,613
9 votes
3 answers
13k views

Sales orders is not displayed in admin panel in grid of Magento2.2.0?

After data migration process I see that orders data is not displayed in Magento admin sales grid. All data is available in the database. Than why data is not in sales grid? Anyone has idea about ...
Dhaduk Mitesh's user avatar
9 votes
3 answers
11k 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 ...
Bhaskar Choubisa's user avatar
9 votes
5 answers
32k 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\...
Idham Choudry's user avatar
9 votes
3 answers
8k 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 = $...
Jancy Abraham's user avatar
9 votes
1 answer
20k 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 ...
Jey DWork's user avatar
  • 1,101
8 votes
2 answers
39k views

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

In the 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 information. NB: the block is added dynamically ...
Alexglvr's user avatar
  • 1,675
8 votes
2 answers
12k 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(...
simple guy's user avatar
  • 2,484
8 votes
1 answer
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/...
user1240207's user avatar
  • 1,339
8 votes
2 answers
9k 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')...
piyush_systematix's user avatar
8 votes
2 answers
13k views

magento 2 - getCreatedAt() returns UTC time and not local time

I am trying to get the order time, I fixed the problem with orders with wrong time stamp in admin panel. Now I am trying to get the order date in my module. The problem is $created = $order->...
Korbin's user avatar
  • 298
8 votes
3 answers
15k 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\...
Jackson's user avatar
  • 9,889
8 votes
1 answer
1k 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 ...
Turpachull's user avatar
7 votes
2 answers
12k views

How to get email address by order id in Magento 2?

I have a controller that load order like this: $order = $this->_objectManager->create('\Magento\Sales\Model\Order')->load($id); Is there a way to get a customer e-mail address by load order ...
simple guy's user avatar
  • 2,484
7 votes
7 answers
14k 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 ...
MagentoMac's user avatar
  • 1,042
7 votes
2 answers
10k views

Get tracking info from order/shipment object

How can I get the shipment tracking information from shipment or order object in magento2. Following ways doesn't work for me. $shipment->getTrackingInfo(); $order->getTrackingInfoByOrder();
Muhammad Saeed Khan's user avatar
7 votes
4 answers
2k 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 ...
tylersDisplayName's user avatar
7 votes
2 answers
8k 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 ...
Manish Joy's user avatar
  • 1,215
7 votes
3 answers
31k 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> <...
saravanavelu's user avatar
  • 3,941
7 votes
3 answers
4k 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 ...
Mohammad Mujassam's user avatar
7 votes
2 answers
3k 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 ...
Rakesh Jesadiya's user avatar
7 votes
3 answers
3k 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 ...
Vaishal Patel's user avatar
7 votes
1 answer
4k 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 ...
Ox3's user avatar
  • 221
7 votes
2 answers
334 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?
saravanavelu's user avatar
  • 3,941
7 votes
0 answers
182 views

Replicate order summary block Magento 2

I want to add an order summary on the checkout success page, I want to replicate the existing order summary block and template file whether it's from backend or frontend. Which block and template file ...
Hunter's user avatar
  • 1,484
6 votes
8 answers
24k views

Consumer is not authorized to access %resources Magento_Sales::sales

I have this basic API script: <?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(-1); $usr = [ 'username' => 'username', '...
treyBake's user avatar
  • 141
6 votes
2 answers
4k 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 ...
Pratik Navapara's user avatar
6 votes
1 answer
4k views

Magento 2 order flow sequence

Hope all is well. It would be great if you could help me to figure out the order flow in Magento 2. I understood these steps Order Placed -> Order in Pending -> Payment Confirmed/Verified. But got ...
ZAZO's user avatar
  • 75
6 votes
2 answers
701 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 ?
mubdea's user avatar
  • 107
6 votes
1 answer
3k 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 ...
ElGatito's user avatar
  • 890
6 votes
2 answers
3k 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/...
James's user avatar
  • 273
6 votes
1 answer
827 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 ...
Zifius's user avatar
  • 1,218
6 votes
0 answers
1k views

Magento 2 Rest API get Quote Item Custom Option values

Hi I have tried with the magento 2 rest apis 1) V1/orders/:order-id 2) V1/orders/items with serach filter order id 3) /V1/carts/:quoteid/items The above apis are not returning the Order item ...
Zammuuz's user avatar
  • 420
5 votes
6 answers
21k 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 ...
david.soares.MS's user avatar
5 votes
4 answers
15k views

sales_order_place_after not triggering in magento 2

I have created etc/events.xml as: <?xml version="1.0"?> <!-- /** * Copyright © 2016 Magento. All rights reserved. * See COPYING.txt for license details. */ --> <config xmlns:xsi="...
P S's user avatar
  • 1,983
5 votes
5 answers
7k 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 ...
Latheesan's user avatar
  • 1,038
5 votes
1 answer
31k views

magento 1.9: Get order & customer details [closed]

I am creating an extension on sales_order_place_after event observer & I want to get the Order & Customer Details with the following code, but I am not sure how to do this correctly. config....
Dinesh's user avatar
  • 809
5 votes
1 answer
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 ...
Denis Spalenza's user avatar
5 votes
1 answer
13k views

Magento 2 - Save additional data to order

I am trying to build an extension that will check if a specific cookie exists at the time an order is being placed. If the cookie does exist, I would like to save its value to the order in the ...
Joshua Barnes's user avatar
5 votes
2 answers
8k 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 ...
Mike Tim Turner's user avatar

1
2 3 4 5
28