New answers tagged

0

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\...


0

Only solution for this doing something with remote ip . If it matches with your admin ip address than fetch the data. if(!empty($order->getRemoteIp()) { check your ip address here }


1

$block->getCustomerId() This should do it, let me know if you need any further assistance ! UPDATE: In order to get the customer and retrive atributes you can do the following: SOLUTION USING OBJECT MANAGER $customerId = $block->getCustomerId(); if(isset($customerId)) { $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $...


0

I have created a module same as to import orders through csv. You can manually do by programatically order script.


0

namespace {VendorName}{ModuleName}\Plugin\ProductOption.php <?php namespace {VendorName}{ModuleName}\Plugin; use Magento\Sales\Api\OrderRepositoryInterface; class ProductOption { /** @var \Magento\Sales\Api\Data\OrderExtensionFactory */ protected $orderExtensionFactory; /** @var \Magento\Sales\Api\Data\OrderItemExtensionFactory */ ...


1

You should use the afterGet and/or afterGetList function. Tell me if you need any more help <?php namespace {VendorName}\{ModuleName}\Plugin; use Magento\Sales\Api\Data\OrderItemInterface; class ProductOption { /** * @var \Magento\Sales\Api\Data\OrderItemExtensionFactory */ private $...


0

You can achieve this by adding product qty which you want to ship. Magento provides partial shipment https://docs.magento.com/user-guide/catalog/inventory-orders-shipment.html#shipments Shipments With Magento Inventory Management enabled, you can send partial or complete shipments from one or more sources to fulfill orders. You control your outgoing ...


0

I am beginner on a magento rest api, I cannot see in the API files or docs on how to retrieve order details of customer with customer id.


1

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 ...


0

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!


0

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: <?php namespace Mbs\GraphQL; class SendToMonday { /** * @var \Magento\Framework\Json\Helper\Data */ ...


1

try this one, the response will have only these fields. entity_id, billing_address,customer_firstname, and customer_lastname only http://www.domain.com/rest/V1/orders? searchCriteria[filter_groups][0][filters][0][field]=entity_id& searchCriteria[filter_groups][0][filters][0][value]=1& searchCriteria[filter_groups][0][filters][0][condition_type]=gteq&...


0

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.


2

Step-1 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(); unset($attributes['prefix']); unset($attributes['suffix']); ......


0

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 ...


0

I assume you are after remove a field? Add a plugin for the Model Magento\Checkout\Block\Checkout\LayoutProcessor <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> <type name="...


1

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,...


0

Please try using the event checkout_onepage_controller_success_action It will help you with the solution.


0

How To Setup Flat Rate Shipping: ( More Details - https://docs.magento.com/user-guide/shipping/shipping-flat-rate.html ) Navigation: Login to Magento Backend > Stores > Settings : Configuration > Sales > Shipping Methods > Flat Rate * Enabled: Yes * Title: Flatrate Shipping * Method Name: Flatrate Shipping * Type: Per Order * Price: <...


0

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


0

In Magento 2, we could change the column visible_on_front from 0 to 1 in table sales_order_status_state like below.


0

I have done this using one of the clues from M1 Question protected $_orderCollectionFactory; public function __construct( \Magento\Sales\Model\ResourceModel\Order\CollectionFactory $orderCollectionFactory ) { $this->_orderCollectionFactory = $orderCollectionFactory; } public function getOrderCollection() { $collection = $this->...


Top 50 recent answers are included