Nathan Day

  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Nathan Day

  • Rank
    Just arrived

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi, hope my snippet helps you. I also came across an issue regarding 3rd party listings, Don't know if your issue is the same but when creating a new product from a third party listing m2epro wasn't correctly setting the quantity. For example if a 3p listing had 20 listed but an order came through for 2 the product qty would only be set to 2. I did also work out what was causing this and overrided it my own extension. I'm afk right now so will post the code I used to fix that when I'm at my PC.
  2. An update for anyone else having this issue, The issue turned out to be that the Magento 2 Extension attempts to create a Stock Item, because the product has already been saved (Which creates a stock item) the extensions is unable to create a new one due to duplicates, Instead what should happen is after a product is saved it should load the existing stock item and modify it as required. The offending can can be found here: vendor/m2epro/magento2-extension/Model/Magento/Product/Builder.php and can be fixed by replacing the createStockItem function with the following code private function createStockItem() { /** @var $stockItem \Magento\CatalogInventory\Model\Stock\Item */ $stockItem = $this->stockRegistry->getStockItem($this->product->getId()); $stockItem ->setQty($this->getQty()) ->setIsInStock(true) ->setUseConfigBackorders(true); $this->stockRegistry->updateStockItemBySku($this->product->getSku(), $stockItem); } hope this helps you.
  3. @Raf did this get resolved for you, I'm having the same issue with Amazon Integration. however I don't get that second log line regarding Unique constraint violation found.