0

I have simple products with custom options, where I can add the products with different options on cart. In cart page, its show different cart items.

For Example: Simple product with cutom options (color and size)

Cart Item 1: Black with small size
Cart Item 2: Green with small size

I added cart item 1 with maximum quantity. While adding the cart item 2 with maximum quantity it throws an error message as

The requested qty exceeds the maximum qty allowed in shopping cart

Excepted results: It should add the item without throwing an error.

1

I noticed in the latest magento version 2.3.4 they updated the condition of maximum value from the cart per product in CheckQuoteItemQtyPlugin file.

Go to the file path:

vendor / magento/ module-inventory-sales / Plugin / StockState / CheckQuoteItemQtyPlugin.php

Here you can below code under aroundCheckQuoteItemQty function

$qty = max($this->getNumber($itemQty), $this->getNumber($qtyToCheck));

Override the plugin file and change the above code to

$qty = $this->getNumber($itemQty);
| improve this answer | |

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.