How can i add every product as a new item into cart instead of updating cart quantity?

ie. Suppose a product is already added in cart. If i add that product again to cart it should add new product not only updating quantity of that product.

  • Explain in more details – Jai Jun 16 '17 at 12:24
  • @jai, when trying to add product to cart then it should be add as new item to cart instead of updating cart if same product already exist in the cart – Ramesh Jun 16 '17 at 12:35
  • like this way stackoverflow.com/questions/32921153/… – Ramesh Jun 16 '17 at 12:36

I got the solution.

we need to override the Quote.php file(Magento\Quote\Model\Quote.php) and should manage if condition in addProduct() method.

 //if (!$item) {
            $item = $this->itemProcessor->init($candidate, $request);
            // Add only item that is not in quote already

Then each product will be add as new item into cart instead of updating existing item

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.