You can get Customer ID in /vendor/magento/module-sales/view/adminhtml/templates/order/create/form/account.phtml using the below code:
<p>Customer Id: <?= $this->getCustomerId() ?> </p>
<p>Customer Email: <?= $this->getQuote()->getCustomerEmail() ?></p>
Check the block $block \Magento\Sales\Block\Adminhtml\Order\...
This should do it, let me know if you need any further assistance !
In order to get the customer and retrive atributes you can do the following:
SOLUTION USING OBJECT MANAGER
$customerId = $block->getCustomerId();
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
You should use the afterGet and/or afterGetList function. Tell me if you need any more help
* @var \Magento\Sales\Api\Data\OrderItemExtensionFactory
You can achieve this by adding product qty which you want to ship. Magento provides partial shipment
With Magento Inventory Management enabled, you can send partial or complete shipments from one or more sources to fulfill orders. You control your outgoing ...
In my opinion, it is totally fine that we don't send null parameters in our API, especially if it is an extension attribute. Why should we send informations that the parameter is empty, if it is optional? By default, if it wasn't passed, we can assume that it isn't present.
I would also use a custom attribute for this and would avoid using extension ...
You are missing payment detail of a specific order, check your source database table sales_order_payment check for the order which show you error and export it and import into your new database it will solve your issue!
the class below should help, I have simplified token, end point and not attempted to create real data provider; you may add your parser and config reader but structurally, i hope you will see what you need to execute your call now:
* @var \Magento\Framework\Json\Helper\Data
try this one, the response will have only these fields.
entity_id, billing_address,customer_firstname, and customer_lastname only
It's better to create it via the admin panel by going to Stores > Configuration > Order Status, and ensure to create a new status for it. Don't forget to enable it. I Hope, with this you can see your custom generated status under order edit settings.
please open the file Magento\Sales\Block\Adminhtml\Order\Create\Form\Address.php and check there is _prepareForm method please add below 2 lines and override the block
protected function _prepareForm()
$attributes = $addressForm->getAttributes();
It turns out using an observer wasn't the optimal solution - another process further down the chain was setting the status back to complete. I also didn't feel that overwriting a previously set status was the most elegant way to achieve what I needed.
I was able to find the method responsible for changing the status of an order after it's set to both shipped ...
I assume you are after remove a field?
Add a plugin for the Model Magento\Checkout\Block\Checkout\LayoutProcessor
You can create a new order status by going to Stores > Configuration > Order Status, and create a new status for that and make sure it is enabled and you'll be able to see your custom generated status under order edit settings.
Now to set your order to custom status whenever it is marked as shipped, you can put an observer event sales_order_save_after,...
In Magento 1, there are sales_flat_order table and sales_flat_order_item table. However, in Magento 2, they are renamed to sales_order and sales_order_item. Please try to back up and run again the data migration tool
I have done this using one of the clues from M1 Question
public function __construct(
$this->_orderCollectionFactory = $orderCollectionFactory;
public function getOrderCollection()
$collection = $this->...