0

I just recently migrated our database from Magento 1.6.1 to Magento 2.3.3 now everything seems OK but after testing all functionality I found out that whenever I add a product in the cart it says that the product is not available even though I know that there are quantities for this product below is how my product grid looks like

enter image description here

As you can see in the Salable Quantity it says No manage stock now when I check the actual product here is the content

enter image description here enter image description here

As you can see the Quantity of the product is still 500 but when you look at the Salable quantity tab. There is no value.

2 Answers 2

0

First, take the backup your Database before trying the below solution.

Run the below query on your Magento Database.

insert into `inventory_source_item`
    (source_code, sku, quantity, status)
    select 'default', sku, qty, stock_status from (`cataloginventory_stock_status` as `lg` join `catalog_product_entity` as `prd` on((`lg`.`product_id` = `prd`.`entity_id`)))

Hope this will work for you.

1
  • Didn't work for me. I got an error Duplicate entry 'default-1023' for key 'INVENTORY_SOURCE_ITEM_SOURCE_CODE_SKU' Feb 16, 2020 at 8:49
0

I also I also encountered salable quantity being empty on new just imported products. Reindex doesn't help.

enter image description here

I noticed that there is no entry for these products in the table inventory_source_item. But, if the product is saved in Admin, an entry is added to this table.

So I run next query

insert ignore into `inventory_source_item`(source_code, sku, quantity, status)
select 'default', sku, qty, stock_status from (`cataloginventory_stock_status` as `css` join `catalog_product_entity` as `cpe` on((`css`.`product_id` = `cpe`.`entity_id`)))

This is to add missing data in the inventory_source_item table. "IGNORE" will skip duplicate values.

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.