New answers tagged

0

This might be helpful for you: <?php namespace Muzammil\HelloWorld\Block; class Products extends \Magento\Framework\View\Element\Template { protected $_orderCollectionFactory; public function __construct( Magento\Framework\App\Action\Context $context, \Magento\Sales\Model\ResourceModel\Order\CollectionFactory $...


0

You can get the order collection using this one : protected $_order; protected $orderRepository; public function __construct(\Magento\Sales\Model\ResourceModel\Order\CollectionFactory $order, \Magento\Sales\Model\OrderRepository $orderRepository) { $this->_order = $order; $this->orderRepository = $orderRepository; } public function ...


0

After some trying around I solved it by using the following SQL qeuery: UPDATE sales_order as SFO INNER JOIN customer_entity as C ON C.email = SFO.customer_email SET SFO.customer_ID = C.entity_id WHERE SFO.customer_is_guest = 0


0

Magento 2 how to change order increment id? Have a look at this answer hope this helps. accept answer if helps Open phpmyadmin and Open sequence_order_1 Table Go to the Operations tab of the sequence_order_1 table, and find the field called AUTO_INCREMENT in the "Table options" box.


0

Use plugin around the parent Magento\Sales\Block\Adminhtml\Order\Create\Data blocks getChildHtml method. Within the plugin I then check the name of the block being rendered and inject my new block where appropriate. E.g etc/adminhtml/di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...


0

Will give you clues how to create it: First you need to create guest quote: use Magento\Quote\Api\CartManagementInterface; use Magento\Quote\Api\CartRepositoryInterface; $quoteId = $this->cartManagementInterface->createEmptyCart(); $quote = $this->cartRepositoryInterface->get($quoteId); Then add product: $quote->addProduct($product, $qty); $...


0

I have successfully extended that using XML file. These are the files which i have used to extend that in my custom module. File Path are you package path then view/adminhtml/layout/adminhtml_order_shipment_new.xml adminhtml_order_shipment_new , adminhtml_order_shipment_view , sales_order_creditmemo_new , sales_order_creditmemo_view , ...


0

After a complete error testing I found as part of an answer on a different stackexchange question. unset($jsLayoutResult['components']['checkout']['children']['steps']['children']['billing-step']['children'] ['payment']['children']['payments-list']['children'][$key]); } } The problem with this is that ...


0

public function beforeSave(OrderRepositoryInterface $subject, OrderInterface $order) { $extensionAttributes = $order->getExtensionAttributes(); $extensionAttributes = $extensionAttributes ? $extensionAttributes : $this->extensionFactory->create(); $resultOrder->setData(self::CUSTOM_SALES_ID, $extensionAttributes->getCustomSalesId())...


0

I can recommend using the trial version of Store Manager for Magento, filter orders by last 7 days and migrate them via export/import


Top 50 recent answers are included