Right, here is a strange one we are using magento 2.4.2 and stock in the channel to import product data (if any one is aware of them) for some strange range we ever we ever we run the import the "saleable quantity" shows empty in admin. saleable quantity empty we can fix this by running INSERT IGNORE INTO inventory_source_item (source_code, sku, quantity, status) select 'default', sku, qty, stock_status from (cataloginventory_stock_statusaslgjoincatalog_product_entityasprd on((lg.product_id=prd.entity_id))) but as soon we run import that field in admin goes empty again. we have tried to fix and change under inventory and source etc but nothing is working. we have asked stock in the channel support and they advised nothing is wrong from there side and there plugin is working fine everywhere else and it is to do with something in our magento.

  • Did you try bin/magento indexer:reindex command? Mar 26, 2023 at 14:40
  • yes and plenty other solutions in google and stackexchange
    – shafiq
    Mar 27, 2023 at 19:08

1 Answer 1


Take DB backup and run below query

INSERT IGNORE 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`)))

after that run below commands.

php bin/magento in:rein

php bin/magento c:f

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.