Can some take an advice how to add each item to a shopping quote separately, even if add few items per one time?
If override method in a class \Magento\Quote\Model\Quote\Item, it works if add the one product per one time, I mean without using input and set 2 and more (in this case it adds as 2 products to a quote)
public function representProduct($product) { $itemProduct = $this->getProduct(); if (!$product || $itemProduct->getId() != $product->getId()) { return false; } /** * Check maybe product is planned to be a child of some quote item - in this case we limit search * only within same parent item */ $stickWithinParent = $product->getStickWithinParent(); if ($stickWithinParent) { if ($this->getParentItem() !== $stickWithinParent) { return false; } } // Check options $itemOptions = $this->getOptionsByCode(); $productOptions = $product->getCustomOptions(); if (!$this->compareOptions($itemOptions, $productOptions)) { return false; } if (!$this->compareOptions($productOptions, $itemOptions)) { return false; } // by default true return false; }