Salable Quantity is showing zero in product grid magento 2?

Please read fully before implementing anything:

Actually in my case Salable Quantity is showing zero in product grid Magento 2.3?

Due to this issue, products are not showing in frontend. If anyone has any idea please tell me.

For this re-indexing is done but even Salable Quantity is showing zero(0).

Reason : Why this happen, when you import database the view may missing, not enough permission to create database

as Because CREATE ALGORITHM=UNDEFINED DEFINER needs super privilege to make this work done

Solution :

IN DataBase There was two type 1> Tables and 2> Views The issue is possibly caused When Import/Export DataBase Views Was Not Created in magento 2.3 So Create Views and inventory_stock_1 table In DataBase.

See Attached Image enter image description here

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`))) ; 

 

Still if you get error

MySQL said: Documentation

#1050 - Table 'inventory_stock_1' already exists

then first take backup inventory_stock_1 and then take backup of that table

and run the command again

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`))) ;

 

This solution is Taken from : https://magento.stackexchange.com/questions/256997/salable-quantity-is-showing-zero-in-product-grid-magento-2

 

Was this article helpful?

Related Articles

Leave A Comment?

You must be logged in to post a comment.