Questions tagged [sales-order]
Denotes questions related to Magento Sales module's order functionality.
526
questions with no upvoted or accepted answers
0
votes
1
answer
351
views
Magento 2 how to get order information using soap api
I want to get order information using soap API
$wsdlUrl = 'http://website.com/soap/default?wsdl=1&services=salesOrderRepositoryV1';
$serviceArgs = array('searchCriteria' =>
array('...
0
votes
1
answer
152
views
Tax amount calculation function issue
I have an issue with tax calculation total, you can see image below.
Where can I find the tax amount calculation function?
I find this in template
<td class="admin__total-amount">
&...
0
votes
1
answer
219
views
Magento2 : Display shipped items value in qty box
After submit shipment in admin and complete order, How to display shipped value in quantity box instead of total qty items like below
I want like this
0
votes
0
answers
366
views
How to create order programmatically in Magento 2 using custom module?
Following code helped me to create order in magento 2 and it is tested already using my magento api :
Include below classs in your module
use Magento\Sales\Api\OrderRepositoryInterface;
use Magento\...
0
votes
0
answers
174
views
How to use 2 observer in same event in Magento 2?
I want to use 2 observer on 'sales_order_place_after' this observer as i have checked if i place one observer it works fine but how can i run 2 observer with one event.
<event name="...
0
votes
1
answer
2k
views
Magento 2 how to add order view information blocks and sections to my custom tab?
I would like to add Order View -> Information sections to my custom tab at admin end.
Here is my layout file sales_order_view
<?xml version="1.0"?>
<!--
/**
* Copyright © ...
0
votes
1
answer
731
views
How to Get Sales Order Report Collection Programmatically in Magento 2
I want to get sales order report collection programmatically. I don't know by which class I can able to fetch. Can anyone please help me?
I want to get same records which display in screenshot.
0
votes
0
answers
459
views
Magento 2.4 extension attribute "pickup_location_code" not updated in grid
For every order I add dropdown that admin user can assign order to another "Pickup location". When user click button "Assign" I call Ajax and in controller change/update "...
0
votes
2
answers
186
views
How to cancel order using tracking number in magento 2?
I need to cancel order using tracking number in magento2?
0
votes
2
answers
440
views
Magento 2 : Delete order programmatically
I am working on to create an a controller
in its execute method the order id will be passed & using that order id the order will be deleted permanently from magento.
is their any way to delete ...
0
votes
1
answer
501
views
I am getting this error PHP Fatal error: Uncaught Error: Class 'Magento\Framework\Model\AbstractModel' not found in
<?php
namespace Mastering\Blowhorn\Model;
use \Magento\Framework\Model\AbstractModel;
class Blowhornmodel extends AbstractModel
{
public function _construct()
{
$this->_init('...
0
votes
1
answer
320
views
Magento 2: Order Information Attachment with Order Email
I have created a module which is used to send order information as attachment in order email like invoice attachment in invoice mail. I got order attachment in order email but I can't get Order items ...
0
votes
1
answer
581
views
Magento 2 - How to add custom customer attributes to sales order API?
I have created custom attributes in the customer table.
I want to add those attributes in order API. How can I do this? Thanks.
0
votes
1
answer
142
views
Adding magento 2 order attribute
I want to create an order attribute that creates a field in sales_order_item table also.
I want to insert some product-related data in this table which I want to filter later in sales report.
0
votes
1
answer
509
views
How to apply cart rules directly on Order?
I have added a BIN promotion which is needed to be applied just before payment directly on order.
I have found 2 methods that apply discount but require a quote object.
\Magento\SalesRule\Model\...
0
votes
2
answers
1k
views
How to display Product Name in the subject of the Email(Order Confirmation Email)?
I want to display product name in the subject of the Order confirmation email.
I want to display like this
Your Order for LooMantha Refrigerator... has been successfully placed
0
votes
3
answers
2k
views
Magento 2 : Disable Sending email when order status change
Is their any way we can stop sending email when order status change from backend magento 2 ?
any thoughts appreciated.
Thanks
0
votes
1
answer
271
views
Magento 2 - How to display recent order on Homepage?
I know that the "recent orders" section is displayed on customer's dashboard. I am wondering if I can display this "recent orders" on the homepage as well?
My website requires ...
0
votes
0
answers
73
views
Magento 2 : Create credit memo by Order
Is their any way we can create partial credit memo using order object & item ?
0
votes
1
answer
129
views
Magento 2 : Make customer name optional while creating customer & saving address?
Is their any way we can make customer lastname as optional while creating & saving customer,
also when we save customer address from $order->getBillingAddress()->getData() ?
code for ...
0
votes
1
answer
433
views
Item status in sales order view not showing backordered after invoice is created
When we receive an order containing an out of stock item (that's allowed to be backordered) it nicely shows "Backordered" at 'Item status' in the backend sales order view.
magento item ...
0
votes
0
answers
348
views
Magento 2 : Override template file (sales order email - gift card product)
I have found that this file is used with _getGiftcardOptions() vendor/magento/module-gift-card/Block/Sales/Order/Item/Renderer.php that provides data to labels for gift card item in the Sales order ...
0
votes
2
answers
45
views
Magento 2 : Get ordered item
I have used sales_order_place_after observer .
i am trying to get product items but i get more items in data
for exg. i have ordered 2 items but i am getting 4 items in data
foreach ($order->...
0
votes
1
answer
276
views
Add column and button magento 2
Is there any way to add a button and column at the backend order view items renderer?
I have tried multiples solution but did not work.
sales_order_view
<?xml version="1.0"?>
<...
0
votes
3
answers
161
views
Magento 2 : Get ordered products in sales_order_after observer
Is their any way i can get the product names in sales_order_place_after observer ?
I get the order object but not sure how to fetch the products.
Any thoughts ?
0
votes
1
answer
245
views
Magento 2 : how to show custom shipping address in email template?
I am trying to send & show custom shipping address on email template
here is the code
$ship_country_id = "US";
$ship_region_id = "CA";
$...
0
votes
1
answer
631
views
Observer checkout_submit_all_after not called on magento 2.3.3
This is my app/code/Nadine/Campaign/etc/events.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="...
0
votes
1
answer
372
views
How to get customerId on sales_order_place_after observer?
I'm trying to get the CustomerId when an order is placed so that I can manipulate it before the order is saved to the DB.
Vendor/Module/etc/frontend/events.xml
<?xml version="1.0"?>
&...
0
votes
0
answers
140
views
boolean order attribute won't save correctly in Magento 1.9
I have created my boolean order attribute
/* @var $installer \Mage_Sales_Model_Resource_Setup */
$installer = $this;
$installer->startSetup();
$smsAttribute = [
'type' => 'int',
'...
0
votes
1
answer
278
views
Magento 2.3.5 - Change Date Format on item options in Sales Order details
UPDATE
I have created a product with custom options like below. One of the fields is a date field. I have modified the date option (date.phtml) to show the time choice on the date-picker. However, ...
0
votes
1
answer
173
views
How to add Item Status to order confirmation email Magento 2.3.1
Is there a way to add the Item status (Ordered/Backordered) to the order confirmation email?
I tried below code.
<td class="item-status">
<?php if ($_item->getQtyBackordered()...
0
votes
1
answer
726
views
Magento 2 - Admin Create Order. sales/order_create/loadBlock cant retrieve layout with <script type="text/x-magento-init">
When Creating an order via the admin. the forms are being loaded by
http://localhost/project/Admin/sales/order_create/loadBlock/block/shipping_method,totals,billing_method?isAjax=true
this request ...
0
votes
0
answers
425
views
Exception occurred during order load - Sales => Orders
Error under Sales => Orders: Exception occurred during order load
Kindly tell me, why this error is coming ? How to I can fix this issue ? I am using Magento 2.4.0.
0
votes
0
answers
136
views
Magento 2 Create order even if product Qty is Zero
I want to create an order programmatically where a product qty is zero. I am unable to do so at I get a message as
{"0":"The requested qty is not available","1":"#1
...
0
votes
1
answer
182
views
How to Create editable filed in sales > order Grid in Magento 2
How to create editable delivery date columns in order grid page.
Please Advice me.How to Create
Thanks.
0
votes
1
answer
300
views
Magento 2 change Ship button in Order functionality
I'm trying to change the functionality of Ship button when you choose an order.
The only thing that I have found so far is this file under /vendor/magento/module-sales/Block/Adminhtml/Order/View.php:
...
0
votes
1
answer
25
views
Get Multiple Order details Magento 1
I am using Magento ver. 1.14.2.4
I am trying to get order detail's for 6-7 orders, want to log their data into (var/log)
What's the best way to do it ?
0
votes
0
answers
195
views
Magento 2 - Where is the template for sales/order/print/order_id/x
I am searching the template for the order PDF which is showing in checkout success when you click the "print receipt" link.
Where can I find it? I have to change the header.
0
votes
0
answers
450
views
Magento 2 - Setting orders to "complete" automatically after placing an order?
I'm trying to set the order status of new orders to "complete" after a new order has been placed but can't see how this is done in the Magento backend.
I can't select the "complete"...
0
votes
2
answers
731
views
Magento 2 - How to add custom attribute to sales/order/view?
How can I add a custom field to sales/order/view in adminhtml?
I want to save a tracking number related to the order.
Thanks.
0
votes
4
answers
1k
views
Magento 2 - How to add a custom field in admin/sales/order/view
How can I add a custom field to admin/sales/order/view?
I'm trying to add a tracking number field to the sales order view.
The tracking number must be saved in the db.
0
votes
2
answers
364
views
Show admin order comments in sales order grid
I am trying to show admin order comments in a new column I created in sales order grid. Anyone know how I would do this?
0
votes
1
answer
24
views
Magento 1 : Issue with Template override
How to override this file in magento 1 using module ?
app/design/adminhtml/default/default/template/sales/order/create/items/grid.phtml
0
votes
1
answer
23
views
Issue with block override Magento 1
Here is what i have tried
i am trying to override Mage/Adminhtml/Block/Sales/Order/Create/Items/Grid.php
block
Config.xml
<?xml version="1.0"?>
<config>
<modules>
...
0
votes
1
answer
112
views
Magento 1 - How to override phtml file in module?
I am using magento 1
I am trying to override the below phtml file in module
app/design/adminhtml/default/default/template/sales/order/create/items/grid.phtml
Any thoughts ?
Thanks
0
votes
1
answer
1k
views
Magento 2: sales_order_save_after called twice after place an order
I'm using Magento 2.3.4 and tried to catch the data order using sales_order_save_after observer like this:
etc/events.xml
<event name="sales_order_save_after">
<observer ...
0
votes
2
answers
2k
views
Magento 2 - Get Shipping Code in Sales Order view in Admin
I have a custom shipping module that passes some information into the Sales Order and the email. The problem is that it shows the data even when the shipping method isn't used. How can I get the ...
0
votes
1
answer
31
views
Magento 2 - Create new order number after updating an order
Create new order number after updating an order.
When order 0000123 was edited, magento created order 0000138 instead of 0000123-1
0
votes
1
answer
1k
views
Magento 2 - How to Make "Reorder" button in the reorder history to always appear?
Reorder button doesn't show up when an item is out of stock. How can I make the code to ignore this condition and allow customer to reorder by excluding the out of stock item.
The "Reorder" ...
0
votes
0
answers
208
views
Magento - Cancel Order not working
Hello Magento Experts,
I have a strange issue in one of my Magento1.9.x site. In the admin panel, when I log in and then I click Sales -> Orders -> Edit any pending order, I click on cancel, it ...