You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is an issue with the implementation of the \ShipperHQ\Shipper\Model\Carrier\Shipper::setRequest method. It uses the \ShipperHQ\Shipper\Helper\Data helper to get quote, which in turn uses Checkout session.
This possesses the problem for a use-case when "collectTotals" process (a part of which \ShipperHQ\Shipper\Model\Carrier\Shipper::setRequest is) is triggered by the \Magento\Quote\Model\Quote::_afterLoad - see https://github.com/magento/magento2/blob/2.1.2/app/code/Magento/Quote/Model/Quote.php#L2350. As can be seen from the link this happens when "trigger_recollect" flag is set to quote. That flag is being set if product in customer's quote is updated or price rule applied.
In that case application falls into infinite loop, as Quote is loaded over and over again when requested in \ShipperHQ\Shipper\Helper\Data::getQuote.
Hi,
There is an issue with the implementation of the
\ShipperHQ\Shipper\Model\Carrier\Shipper::setRequest
method. It uses the\ShipperHQ\Shipper\Helper\Data
helper to get quote, which in turn uses Checkout session.This possesses the problem for a use-case when "collectTotals" process (a part of which
\ShipperHQ\Shipper\Model\Carrier\Shipper::setRequest
is) is triggered by the\Magento\Quote\Model\Quote::_afterLoad
- see https://github.com/magento/magento2/blob/2.1.2/app/code/Magento/Quote/Model/Quote.php#L2350. As can be seen from the link this happens when "trigger_recollect" flag is set to quote. That flag is being set if product in customer's quote is updated or price rule applied.In that case application falls into infinite loop, as Quote is loaded over and over again when requested in
\ShipperHQ\Shipper\Helper\Data::getQuote
.One of the possible solutions would be to explicitly set Quote to the helper somewhere here: https://github.com/shipperhq/module-shipper/blob/master/src/Model/Carrier/Shipper.php#L290. Please also note that on L289 you're checking object for being a Magento 1 class instance - that needs to be fixed.
The text was updated successfully, but these errors were encountered: