module overide magento 2.2

I’m using magento 2.2 version with Amasty multineventory module to maintain separate warehouse per separate store view . is there any possibility by overriding the Amasty module in another custom module to get an item’s available quantity on product view page and listening page. which class or the function if you have used Amasty multi…

Magento 2: when merging my current cart (created programatically) with guest cart, same items not merging

public function addProductToCart($allItemsCollection){ $cartId = $this->cartManagementInterface->createEmptyCart(); //Create empty cart $quote = $this->cartRepositoryInterface->get($cartId); // load empty cart quote $store = $this->_storeManager->getStore(); $quote->setStore($store); $quote->setIsActive(1); // if you have allready buyer id then you can load customer directly $quote->setCurrency(); $quote->assignCustomer($this->_customerRepository->getById($this->session->getCustomerId())); //Assign quote to customer $this->_checkoutSession->setQuoteId($cartId); //add items in quote foreach($allItemsCollection as $item){ $product = $this->_productFactory->create()->load($item->getProductId()); $product->setPrice($item->getPrice()); $quote->addProduct($product, intval($item->getQty()));…