2

I am getting below error in place order with "google pay"

[2021-06-30 12:00:06] report.CRITICAL: Error message {"exception":"[object] (Magento\Framework\Exception\LocalizedException(code: 0): The requested qty is not available at Magento2/vendor/magento/module-quote/Model/Quote.php:1711)"} []

I have checked a product has a qty = 1, then also error appearing any thoughts ? what can be the cause of the issue ?

The quoterepo is already instantiated above

$quote = $this->quoteRepository->get($cartId);

& then it again uses "quoteRepository" to save quote $this->quoteRepository->save($quote), it should used the same instance which loaded before.

6
  • any thoughts on this ?
    – devhs
    Jun 30, 2021 at 12:04
  • 1
    did you use MSI? Jun 30, 2021 at 12:18
  • How can i check that ?
    – devhs
    Jun 30, 2021 at 12:19
  • See product qty - awesomescreenshot.com/image/…
    – devhs
    Jun 30, 2021 at 12:20
  • any thoughts on this ?
    – devhs
    Jun 30, 2021 at 12:46

1 Answer 1

0

The quoterepo is already instantiated above in code like

$quote = $this->quoteRepository->get($cartId);

& then it again uses "quoteRepository" to save quote like $this->quoteRepository->save($quote), it should used the same instance which loaded before.

Using $quote->save();

error gone.

1
  • any thoughts on this solution ?
    – devhs
    Jun 30, 2021 at 13:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.