We have imported products to our website. For most of products salable quantity shows 0.
We try run reindex but still salable quantity shows 0.
Any solution?
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityWe have imported products to our website. For most of products salable quantity shows 0.
We try run reindex but still salable quantity shows 0.
Any solution?
I suggest first take backup of your Database. After try this query:
CREATE ALGORITHM=UNDEFINED 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`))) ;
After exceution of query just reindex and flush chahe
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
)))
Jul 26, 2020 at 15:54