0

I am using emagic one to import 35,000 products into a new instance of Magento 2.4.7. The import goes well, with all product fields and images imported. The issue that I have is that "saleable quantity" is set to zero for all products, even though "qty" is set to 10,000 for all products.

I understand that saleable quantity = quantity - reservations

In Magento 2.4.3-p1 I used to be able to use the native import products facility to import a csv file with "sku","qty" and "is_in_stock" (after I had imported products via emagic one) and this would change the "saleable quantity" to 10,000 for each product. However this does not seem to work with Magento 2.4.7

Does anyone have any suggestions as how to set saleable quantity in bulk in Magento 2.4.7?

Thanks Jim

New contributor
Jim Edgar is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

2 Answers 2

1

In the Database, we have Tables and Views. The issue might be caused by the import process which will not creating the database views in Magento. To resolve this, please create the necessary views and the inventory_stock_1 in the database. If already exists then Drop and regenerate that table using below command.

CREATE ALGORITHM=UNDEFINED DEFINER=root@localhost SQL SECURITY INVOKER VIEW inventory_stock_1  AS  select distinct legacy_stock_status.product_id AS product_id,legacy_stock_status.website_id AS website_id,legacy_stock_status.stock_id AS stock_id,legacy_stock_status.qty AS quantity,legacy_stock_status.stock_status AS is_salable,product.sku AS sku from (cataloginventory_stock_status legacy_stock_status join catalog_product_entity product on((legacy_stock_status.product_id = product.entity_id))) ;

See the attached image for reference.

enter image description here

0

It turns out that I must have been making an error in naming the columns (whitespace possibly) I did actually get this to work earlier this afternoon by importing a csv file with the following fields: sku, qty (value 10000), out_of_stock_qty (value 0), is_in_stock (value 1),

As an aside I was getting an error message when trying to import a csv file comprising product sku code and product url_key (to get clean SEO). when checking the data Magento was telling me that I had an extra column with data in it, but no title. On inspecting the csv file (libreOffice) there was no data in this extra third field. This was resolved by unescaping HTML entities in the url_key field. Out of 35,000 products only 1 had an issue which unescaping picked up, but this was enough to prevent the import.

Magento is a wondrous thing!

Thank you for your help.

Best regards Jim

New contributor
Jim Edgar is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.