owebia / magento2-module-advanced-shipping

Other
90 stars 28 forks source link

Infinite loop when using $quote variable on some configurations #34

Closed owebia closed 10 months ago

owebia commented 6 years ago

On some configurations, we get an infinite loop when trying to use the $quote variable.
This problem can't be reproduced on a new Magento installation.

The usage of $request->package_value instead of $quote->subtotal can solve the problem.

If you find the configuration leading to this infinite loop, please post it here.

benjamin-volle commented 6 years ago

Hello,

I think I found the issue.

The case is reproductible when there is a misconfigured "currency setup" (in Stores > Configuration > General > Currency setup):

For example, you are on a norwegian store, so the "Default Display Currency" is "Norwegian Krone" and the "Norwegian Krone" is not selected in "Allowed currencies".

In fact, Magento, in the class \Magento\Checkout\Model\Session::getQuote tries to re-save the quote, checking at this moment some things.

I think you should not use the getQuote from the session to solve the issue.

Best,

owebia commented 6 years ago

Hi @synolia-bvo , thanks for your feedback, I will explore this when I will have a little time.

Best Regards,

owebia commented 5 years ago

@syno-bvo Do you see any difference in the last version of the module? Quote is loaded another way.

owebia commented 10 months ago

Closing as it has not been reported recently