Neues Thema starten

Magento2 Stock update 404 error on random SKU's

Hello,

I need to stock update ITScope products to a Magento2 e-shop. The trouble that I find is that I get 404 errors in same requests, on different SKU's like:

 Step: SpreadsheetUrlDownload

set quantity and stock status (optional): WARNING: Error during request 28: HTTP status code error: 404 (Not Found)
Each time I run the flow, the product database changes, but the error persists on the same requests.
While the SKU's exist in the e-shop database. I have already set the SpreadsheetDatastoreWriter to update only, but this doesn't seem to fix anything. Any ideas?

A HTTP 404 usually means, that something does not exist. Is it possible that not all products are in your Magento2? 

If this is the case, then you need to filter (remove) the non-existing products first before passing them to the Magento2StockUpdate step.

Error during request 28: 
You could check which SKU is in row 28 of your spreadsheet. And then check if there is something special with that sku.


This cookbook describes this process how to recognize new or existing products.



Thank you for the fast response. That was the issue.
Is there anyway that the missing SKUs be skipped with no warnings or errors that stop the procedure?

No, you need to filter (remove) the SKUs before, because otherwise you would flood your Magento with useless API calls. It can be done with the approach described in the cookbook.

Basically the approach is using 2 Flows:


Flow 1:

1. Fetch all Products using Magent2GetProducts and store them in a Datastore using SpreadsheetDatastoreWriter

Now you know all products you have in Magento and can apply filtering.  Run this flow e.g. once per day / at night, so it syncs new products from your Magento. 


Flow 2: (your current import)

Use a a SpreadsheetMapper with the Lookup function (in german Querverweis) All Products which are not in your Magento should return a "No Record found". 

Use a SpreadsheetFilter to do remove the "No Record found" rows.
Now you should only have rows which also exist in your Magento. 

Proceed with your update. 


Anmelden um einen Kommentar zu veröffentlichen