Questions tagged [sales-order]

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

Filter by
Sorted by
Tagged with
2
votes
1answer
307 views

How to get applied coupon code amount in the order collection in magento2

I have applied a coupon code and placed an order.I need that coupon code amount that has been applied from the order collection. Thanks in advance. I got the coupon with this piece of line $order-&...
2
votes
1answer
733 views

Magento 2 Get Sales Representative name who placed the order in Order View Page

I want to add Sales Representative name in Order View page and Invoice PDF for the orders placed via Admin. For the same I need to add a column to order table which will have the admin name. After ...
2
votes
1answer
386 views

Magento 1.9: I want rewrite form.phtml

I want to add some custom tab in Sales order shipping page so i try to rewrite below way config.xml <?xml version="1.0"?> <config> <modules> <MPS_Delivery> &...
2
votes
1answer
5k views

Adding custom sales order attribute to order grid

I have created a custom sales order attribute using the installer of my custom mage module like this: $installer = new Mage_Sales_Model_Mysql4_Setup; try { $installer->addAttribute('order', '...
2
votes
1answer
617 views

Cancelling an order is messing up the increment IDs

Here's the scenario. For example $oldOrder has an increment ID of 100000044 if($oldOrder->canCancel()) { $order->cancel(); $order->save(); } When I call the above,...
2
votes
1answer
783 views

Admin - Error on one particular order view

I am getting below error when trying to view one particular order in admin area. I tried to cancel / view but shows error page. There has been an error processing your request Image file was not ...
2
votes
3answers
3k views

Customers multiple email addresses

I've been searching high and low but I can't seem to find any information on this. My client would like the ability of multiple email addresses to a customer, so that all sales emails would be sent ...
2
votes
2answers
410 views

Magneto 2 - Email has a wrong format

I recently upgraded from 2.2.3 to 2.2.8 then to 2.3 and onto 2.3.3 and I've come across a strange error. When an order is being created, I get the following error: Failed address validation: Email ...
2
votes
1answer
51 views

How to add extra column in Item ordered tab in Magento2.3?

How to add an extra column in Item ordered tab in Magento 2? PFA Any ideas?
2
votes
1answer
186 views

Add a new column of “Customer Group” in a Customer grid during order creation

I want to add a Customer Group in a Customer grid during order creation For Magento2. I made [vendor]\[module]\view\adminhtml\layout\sales_order_create_customer_block.xml like this: <?xml ...
2
votes
1answer
569 views

Magento Recommended way to add comment to order

I am looking for the Magento recommended best practice for adding a comment to an order. I can easily accomplish this using things such as $order->addCommentToStatusHistory($message)->save() and ...
2
votes
1answer
119 views

What is different between subtotal and subtotal_invoiced

Sometimes I have seen in order in the sales_flat_orders table that have a subtotal but have no subtotal_invoiced. What is different between them? Here is a sample row extracted from sales_flat_orders ...
2
votes
2answers
2k views

Magento 2.2 - Get product attribute value in order detail Admin

How to show product attribute value in order detail in Magento 2.2.6? I already tried below code but not working: File Path: public_html/vendor/magento/module-sales/view/adminhtml/templates/items/...
2
votes
1answer
773 views

Show order comment history on invoice

I'm trying to show the order comments history on the invoice (Magento 2.2.6) I've written the following override: app/code/Denial/InvoiceComments/etc/di.xml <?xml version="1.0"?> <config ...
2
votes
1answer
124 views

How to get the orders above the order id and How to use the limit in magento 2

I need to write code to get next 10 orders above the given order id. <?php namespace Learning\GreetingMessage\Controller\Index; use Magento\Framework\Controller\ResultFactory; use Magento\...
2
votes
1answer
39 views

Mail Notification when Item is Out of Stock

I am trying to achieve the following: When an item is Out of Stock send an E-Mail Notification to the warehouse. First question would be: what's the easiest and cleanest way to achieve this?! My ...
2
votes
1answer
353 views

Magento 1.9 API v2 Payment Additional Information

I'm trying to extend the API response of Magento SalesOrderInfo - more specifically, I'm trying to get back the paymnent additional_information In my module, in etc/wsdl.xml I added <...
2
votes
2answers
738 views

How to get order id in Magento/Sales/View/Adminhtml/templates/totals.phtml?

I've tried a lot but can't get current order id from totals.phtml under my adminhtml directory.
2
votes
2answers
810 views

Force order status and state to processing after creating shipment using observer

I created an observer to change my order status after creating shipment like this: events.xml <?xml version="1.0" ?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
2
votes
1answer
70 views

Magento 2 Order Attribute Creations

I want to create three new order attribute for checkout page, so I found good tutorials to create using install script but I want to add text boxes to checkout page and save it to database, Are there ...
2
votes
1answer
1k views

Sales Order Grid Custom Field value not saved

I have create a custom field(zipcode) in sales_order and sales_order_grid, after that i try to save to database while click placeorder the order in frontend,so try to use checkout_submit_all_after ...
2
votes
1answer
1k views

How can i get Tracking Number on Sales order grid

I need tracking number on sales order grid,
2
votes
2answers
471 views

How to add quote Item id as new field?

I have a new field varient_id in sales_flat_quote_item and sales_flat_order_item table. I want to save item_id as varient_id in sales_flat_quote_item and sales_flat_order_item table. ie,quote ...
2
votes
2answers
759 views

Unable to set the order status after sales_order_save_after

I want to check my order and if my order has any back order items i want to set the order status as Back orders(My custom status code is backorders). My config.xml <events> section is : - <...
2
votes
1answer
1k views

Decrease stock when order status changes to processing

I have a condition that I have to change/decrease the stock only when the order status changes to processing. By default it is changed as soon as order is placed. But, this is what I need to achieve.
2
votes
1answer
271 views

Retrieve orderid to check with the incoming order id whether it's present or not?

I am totally new to magento and I have orderid. Now I have to check whether it exists or not.I am not aware of what class and method should be used for this. Thanks In Advance...
2
votes
2answers
394 views

Get All Orders from Database

I am following this article. I would like to retrieve all Orders from Database. Can anyone say how can I do that??
2
votes
1answer
305 views

Comment added by webservice not visible in front end

I'm using the magento version 1.9.2.4 with its webservice wsdl, i'm adding comments in my request using the webservice's method with java: proxy.salesOrderAddComment(session, "100000019", "...
2
votes
2answers
2k views

How to get all order items using sales_order_grid_collection_load_before in magento

Below is my code but I can't fetch order items details,just I need order items from sales_order_grid_collection object,I also try getAllItems() but it does not work This is my config.xml file <...
2
votes
2answers
703 views

Cannot edit order or send the email from “sales - orders” inside admin

We updated to magento 1.9.2.1 but now we can't edit any order or send the email from the order itself inside "sales - orders"; what could be the reason? CronJobs are working properly. When I click "...
2
votes
1answer
790 views

Custom filter in the sales order admin grid giving php strict notice error

I've been able to add columns to the sales order grid table in admin, but when I try to use the column to search I get an error Strict Notice: call_user_func() expects parameter 1 to be a valid ...
2
votes
4answers
12k views

Change order status programmatically not working

I have two environments, production and development. And I tried to run this code on root of Magento: <?php require_once "app/Mage.php"; Mage::app('default'); error_reporting(E_ALL); ini_set('...
2
votes
1answer
1k views

Warning: vsprintf(): Too few arguments in …/app/code/core/Mage/Adminhtml/Helper/Sales.php on line 133

I am testing CE ver 1.9.1.1 and discover the error. To replicate, go to any sales order page in admin and enter "80%" in the comment history, click the button Submit Comment. So far so good, then hit ...
2
votes
1answer
981 views

Join Custom Table With Admin / Sales / Order / View

Basically i'm trying to add additional data's to sales -> order -> view page. I have a custom table named 'additional_order_info' i want to join this table with 'sales_flat_order' using 'order_id' ...
2
votes
3answers
2k views

How do I query the sales/order_collection to shipping_lastname

I'm trying to query the database and build a page which is outside of the admin console. It's a quick page to show what products my manufacturing guys need to make. I've managed to put this together (...
2
votes
1answer
1k views

Order email not working in CE 1.9 in hostgator shared hosting plan

Hello could anyone help me to resolve my order email problem, i am struggling with setting up cron job in hostgator, currently i am running on shared plan, as per hostgator, in shared service plans ...
2
votes
1answer
1k views

Add products to sales quote in magento admin programmatically

I have customized search product grid as per client need (created new grid and disabled search grid) under sales order create page. I have created new grid successfully after "Items Ordered" block. ...
2
votes
2answers
2k views

Custom sales order report NOT matching Magento's sales order report

I'm building a custom report sales order using the following code as a start. I'm trying to get all orders that have been updated Yesterday, by passing filters from date and to date to sales/order ...
2
votes
1answer
2k views

Attaching guest checkout orders to user accounts

I'm stuck with a specific requirement on my magento shop. I have enabled the guest checkout method on magento to remove the necessity of registering. But now this information is useless for providing ...
2
votes
1answer
71 views

Magento 2 Can we split order with same order number

Suppose, there are 2 types of products on my website Product A & Product B. Here, are 3 cases - Case 1 - When customer order Product A(any quantity) type product then from Magento we will get ...
2
votes
1answer
25 views

Remove Payment Due for Sales order

How do we remove additional payment due on Magento if the customer paid outside of Magento? The case is the customer bought a product online and paid but changed his order and sent an additional ...
2
votes
2answers
567 views

New orders are not showing in the orders grid but payement received?

I upgraded from Magento 2.5.0 to 2.3.1 I am using only PayPal as a payement method. new orders are not showing in the orders grid in Admin > Sales > Orders and emails are not sent !! when I check ...
2
votes
1answer
498 views

Magento 2 - Reverting cancel orders programmatically

For some reason order canceled in bulk through my customly added order cancel mass action. Now I need to uncancel all orders. Change status from cancel to the status that was previously set on order ...
2
votes
1answer
584 views

How to get entity id(order id) in success phtml

In my success.phtml , $block->getViewOrderUrl() gives a order url with order id(entity id) . dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/Success.php /sales/order/view/...
2
votes
2answers
249 views

Magento2 filter not working for request parameter for order grid

I want to filter Sales Order query based on request parameter passed in querystring like following: http://127.0.0.1/website/admin/sales/order/index/key/...
2
votes
1answer
397 views

How custom attribute of “sales_order_item” table will be save also in “sales_order”

I am using plugin for converting "quote_item" to "sales_order_item" from below give code it work. public function aroundConvert( \Magento\Quote\Model\Quote\Item\ToOrderItem $subject, \...
2
votes
1answer
172 views

Getting order id for guest checkout order

I need to assign a Guest Order to a Customer, so i found this link How to assign a Guest Order to a Customer - Magento 2 Using SQL UPDATE sales_order SET customer_id = {YOUR CUSTOMER ID}, ...
2
votes
2answers
363 views

Magento 2: Get last 5 orders detail

I have code for last order detail but I want last 5 orders. For last order detail code is: $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $orderDatamodel = $...
2
votes
1answer
620 views

From where magento 2 set Template Id for order email

I know already that in Magento 1 Directory app\code\core\Mage\Sales\Model\Order.php have code // Retrieve corresponding email template id and customer name if ($this->getCustomerIsGuest()) { ...
2
votes
1answer
343 views

Magento2: Order updated_at stored in DB in timezone CEST but delivered/transformed to UTC by $order->getUpdatedAt in Environment “crontab”

we are facing a strange behavior for value of updated_at saved in db table sales_order. Server timezone is CEST, updated_at date therefor is saved in CEST to database. This is validated. Default ...

1
3 4
5
6 7
25