Closed
Description
Preconditions
- Multi-website Magento instance
Steps to reproduce
- Create an order from the admin panel, but NOT for the default store
Expected result
- An order placed successfully
Actual result
- The No such entity with cartId = ... error occurs
Possible fix
Find this method \ShipperHQ\Shipper\Observer\RecordAdminOrder::execute()
and set the current store before recording the order (do not forget to inject the StoreManagerInterface to the constructor):
public function execute(EventObserver $observer)
{
if ($this->shipperDataHelper->getConfigValue('carriers/shipper/active')) {
$order = $observer->getEvent()->getData('order');
$this->storeManager->setCurrentStore($order->getStoreId());
if($order->getIncrementId()) {
$this->recordOrder($order);
}
}
}
Look at this magento/magento2#6522 core bug for more info.
Metadata
Metadata
Assignees
Labels
No labels