1

Wired issue [Magento 2.3.2-p2] While placing a final payment I'm getting "server 500 error The requested qty is not available" While product qty is available. If qty is not available then it should give error while adding to the cart not on the checkout page.

1 exception(s):
Exception #0 (Magento\Framework\Exception\LocalizedException): The requested qty is not available

Exception #0 (Magento\Framework\Exception\LocalizedException): The requested qty is not available
<pre>#1 Magento\Quote\Model\Quote->updateItem(1049, &Magento\Framework\DataObject#00000000438f730900000000335e9cbe#) called at [vendor/magento/module-quote/Model/Quote/Item/CartItemPersister.php:73]
#2 Magento\Quote\Model\Quote\Item\CartItemPersister->save(&Magento\Quote\Model\Quote\Interceptor#00000000438f685400000000335e9cbe#, &Magento\Quote\Model\Quote\Item\Interceptor#00000000438f686800000000335e9cbe#) called at [vendor/magento/module-quote/Model/QuoteRepository/SaveHandler.php:82]
1
1

i faced similar issue for configurable product, you can check this file in vendor:

vendor/magento/module-configurable-/Model/Quote/Item/CartItemProcessor.php:70

update this code: $requestData = ['id' => $cartItem->getItemId()]; enter image description here

if this code can fix your issue, you can create plugin to set cart item id to $requestData

seem this is bug from magento, they not set cart item id to buyRequest, but they checked it when init cart item by buyRequest:

vendor/magento/module-quote/Model/Quote/Item/Processor.php:94

this issue happen when try save quote with configurable product.

1
  • I did the same which you suggested but not working . Jun 11 at 7:05

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.