Hot answers tagged

3

I don't think it's related to customer being logged in or not, but I think order items are not persisted yet, as you're retrieving new order object. Also you should never use objectManager directly. Try updating your code to this: public function execute(\Magento\Framework\Event\Observer $observer){ $order = $observer->getEvent()->getOrder(); $...


2

Change your event file name with events.xml app/code/Vendor/Module/etc/events.xml Clear cache and check it.


2

I cannot tell you the reason why the order was canceled. There could be a lot of reasons payment processor sent a message back for canceling the order someone actually canceled it from admin ,,, But I can tell you how to make it invoice-able again. Take the order id. The entity_id field in the sales_order table, not the increment id. Let's say it's 110. ...


2

In mageto2, you can not cancel an order which is at Hold status. If you want then you first need to changes order status to UnHold then you can cancel.


1

You can using plugin for update stock after placing order: /app/code/Vendor/Module/etc/di.xml <?xml version="1.0" ?> <!-- /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:...


1

The data you are looking for 'QTY' on Checkout page. That comes by knockoutJS in Magento 2. Knockout basically bind data to HTML template and serves dynamic content. If you can check "Application" Tab (F12), In Local Storage > Mage-Cache-Storage > Cart (Section Data) driven from Knockout. You can see QTY, Options and all other parameters there. If ...


Only top voted, non community-wiki answers of a minimum length are eligible