Skip to content

Commit

Permalink
20.20.2 SHQ18-774 Ensure correct store configuration is used in admin…
Browse files Browse the repository at this point in the history
… orders
  • Loading branch information
wsajosh committed Sep 19, 2018
1 parent 91ecdcd commit 3d2c7f5
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG-PUBLIC.md
Expand Up @@ -292,3 +292,7 @@ SHQ18-155 support map and location details for in store pickup
SHQ18-511 Fix tooltips breaking checkout when method has special chars


## 20.20.2 (2018-09-19)
SHQ18-774 Ensure correct store configuration is used in admin orders


4 changes: 4 additions & 0 deletions CHANGELOG.MD
Expand Up @@ -292,3 +292,7 @@ SHQ18-155 support map and location details for in store pickup
SHQ18-511 Fix tooltips breaking checkout when method has special chars


## 20.20.2 (2018-09-19)
SHQ18-774 Ensure correct store configuration is used in admin orders


2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -17,7 +17,7 @@ Once installed, you can configure with your ShipperHQ platform credentials to pr

Compatibility
-------------
- Magento >= 2.0 (Incl 2.2.x)
- Magento >= 2.1 (Including 2.2.x)

- Supports both Magento Opensource (Community) and Magento Commerce (Enterprise)

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -2,7 +2,7 @@
"name": "shipperhq/module-shipper",
"description": "Magento Shipping integration with ShipperHQ",
"type": "magento2-module",
"version": "20.20.1",
"version": "20.20.2",
"license": [
"OSL-3.0",
"AFL-3.0"
Expand Down
3 changes: 2 additions & 1 deletion src/Model/Carrier/Processor/ShipperMapper.php
Expand Up @@ -307,7 +307,8 @@ public function getShipperTranslation($magentoRequest)
$shipperHQRequest->setCarrierId($carrierId);
}

$storeId = $magentoRequest->getStoreId();
//SHQ18-774
$storeId = $magentoRequest->getQuote()->getStoreId() ? $magentoRequest->getQuote()->getStoreId() : $magentoRequest->getStoreId();
$ipAddress = $magentoRequest->getIpAddress();
$shipperHQRequest->setSiteDetails($this->getSiteDetails($storeId, $ipAddress));
$shipperHQRequest->setCredentials($this->getCredentials($storeId));
Expand Down
2 changes: 1 addition & 1 deletion src/composer.json
Expand Up @@ -2,7 +2,7 @@
"name": "shipperhq/module-shipper",
"description": "Magento Shipping integration with ShipperHQ",
"type": "magento2-module",
"version": "20.20.1",
"version": "20.20.2",
"license": [
"OSL-3.0",
"AFL-3.0"
Expand Down
2 changes: 1 addition & 1 deletion src/etc/config.xml
Expand Up @@ -57,7 +57,7 @@
<ws_timeout>30</ws_timeout>
<use_cache>0</use_cache>
<always_use_cache>1</always_use_cache>
<extension_version>20.20.1</extension_version>
<extension_version>20.20.2</extension_version>
<allowed_methods></allowed_methods>
<magento_version></magento_version>
</shipper>
Expand Down

2 comments on commit 3d2c7f5

@squeegy06
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello,

When we use the ship to multiple addresses option on our site, shipperHQ is throwing a fatal error, and it looks like it is caused by this change.

PHP Fatal error: Uncaught Error: Call to a member function getStoreId() on null in /.../vendor/shipperhq/module-shipper/src/Model/Carrier/Processor/ShipperMapper.php:311

It appears to be that $magentoRequest->getQuote() is returning null. I'm not entirely sure of the reason, but I just wanted to make you aware of this for your testing. We are using Magento 2.2.5

Steps to reproduce:

  1. Configure your store to allow shipping to multiple address on an order.
  2. Sign into a customer account on the frontend.
  3. Add multiple items to your cart.
  4. View your cart
  5. Select "Checkout with multiple addresses"
  6. Choose your addresses for the items and click "Go to Shipping Information"
  7. Observe error.

Result:
500 Error

Expected Result:
Expected page to select shipping options.

@wsajosh
Copy link
Contributor Author

@wsajosh wsajosh commented on 3d2c7f5 Oct 4, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@squeegy06 Thanks for this. We've raised a issue on this repo for this. We're working on a fix now

Please sign in to comment.