Raf 0 Report post Posted January 5, 2018 Hi Fresh install of Magento 2.2.2 and Ess_M2ePro 1.3.2 through Magento Marketplace Only 3rd party eBay listings. When item is sold on eBay new product in Magento is created, but customers and orders are not created. Usually it looks like that: Magento -> ebay integration -> Sales -> Orders Logs & Events -> eBay order -> Order Log 5 Jan 2018, 21:26:40 Magento Order was not created. Reason: Unable to save Stock Item 5 Jan 2018, 21:32:05 Magento Order was not created. Reason: Unique constraint violation found I have also another installation of Magento ver. 1.9.3.7 with m2epro_ebay_magento 6.4.13 (stable) on different hosting where everything works fine. Quote Share this post Link to post Share on other sites
Raf 0 Report post Posted January 6, 2018 Investigating problem further: Once item is sold on eBay Magento product is created with empty quantity and "out of stock". Once I update Magento product with some quantity and change stock status to "In Stock" order/invoice/customer is created after next cron run. So I believe problem starts with importing eBay's product's quantity when created in Magento by m2epro. Quote Share this post Link to post Share on other sites
primavera 14 Report post Posted January 8, 2018 Hi! I have found some information. Firstly, I recommend you to check the following settings: Set "Import eBay Orders:" = Yes Product Is Listed By Any Other Software > Create Order in Magento = Yes. Also, you need to enable New Customer Creation (see the screenshots below). Note: The latter setting will set M2E Pro to collect orders for eBay listings that you did not list via M2E Pro. Well, I have also found some links, hope, they will be helpful.https://stackoverflow.com/questions/21458694/m2epro-ebay-order-in-magento-are-not-created https://magento.stackexchange.com/questions/56424/magento-admin-not-able-to-create-new-customer-while-creating-new-order It seems to me, that there is a conflict or some files are missing. 1 Quote Share this post Link to post Share on other sites
Raf 0 Report post Posted January 8, 2018 6 hours ago, primavera said: Hi! I have found some information. Firstly, I recommend you to check the following settings: Set "Import eBay Orders:" = Yes Product Is Listed By Any Other Software > Create Order in Magento = Yes. Also, you need to enable New Customer Creation (see the screenshots below). Note: The latter setting will set M2E Pro to collect orders for eBay listings that you did not list via M2E Pro. Well, I have also found some links, hope, they will be helpful.https://stackoverflow.com/questions/21458694/m2epro-ebay-order-in-magento-are-not-created https://magento.stackexchange.com/questions/56424/magento-admin-not-able-to-create-new-customer-while-creating-new-order It seems to me, that there is a conflict or some files are missing. Thanks for reply but all of this is about Magento 1.9 with m2epro and it works as expected. I'm having problem with Magento 2.2.2 and Ess_M2ePro 1.3.2 Quote Share this post Link to post Share on other sites
primavera 14 Report post Posted January 8, 2018 Oh, sorry( I also asked my colleague about this kind of issue. He told me that (if I am not mistaking) starting from Magento 2.1.8. the issues can occur if Magento Index is scheduled. As a temporary solution, you can try to enable Immediate Indexing. Hope, this helps. If no, it is better to contact M2E Support Team and ask for a piece of advice. Quote Share this post Link to post Share on other sites
Raf 0 Report post Posted January 8, 2018 30 minutes ago, primavera said: Oh, sorry( I also asked my colleague about this kind of issue. He told me that (if I am not mistaking) starting from Magento 2.1.8. the issues can occur if Magento Index is scheduled. As a temporary solution, you can try to enable Immediate Indexing. Hope, this helps. If no, it is better to contact M2E Support Team and ask for a piece of advice. I though M2ePro Support Team sometimes have a look at their forum. Quote Share this post Link to post Share on other sites
primavera 14 Report post Posted January 9, 2018 I assume that something is wrong with your environment, but I am not sure, the investigation is needed. In your case it is necessary to give a support representative an opportunity to check it personally, to see what can be wrong. I just meant that in order to check if everything is alright with your system, support representatives will need your credentials etc. This information is confidential, and it is not a good idea to share it here:) Quote Share this post Link to post Share on other sites
Nathan Day 0 Report post Posted February 6, 2018 (edited) @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. Edited February 6, 2018 by Nathan Day Quote Share this post Link to post Share on other sites
Nathan Day 0 Report post Posted February 7, 2018 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. Quote Share this post Link to post Share on other sites
Raf 0 Report post Posted February 11, 2018 Hi I turned off stock management in Magento and it looks much better. Quote Share this post Link to post Share on other sites
Raf 0 Report post Posted February 11, 2018 Hi I turned off stock management in Magento and it looks much better but having some other problems with settings regarding synchronization with 3rd party listings I stopped to find solution. I modified Builder.php code with your solution and turned back on Magento stock management. I'll see what happens . Quote Share this post Link to post Share on other sites
Nathan Day 0 Report post Posted February 14, 2018 (edited) 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. Edited February 14, 2018 by Nathan Day Spelling correction Quote Share this post Link to post Share on other sites