0

I use script for update product qty.

Example: product one have

  • quantity: 0 pcs
  • salable quantity: 0 pcs

Now I update product and is available total 11 quantity. https://prnt.sc/rmmeuo

But for Salable quantity still display 0 pcs and product in not available on sale on website. How to solve this issue ans sync qty ==> salable quantity?

1

There is a view per website that need to exist. Check if you have the inventory_stock_1 view in your database

If not, this might work:

CREATE OR REPLACE
ALGORITHM = UNDEFINED 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`)))
|improve this answer|||||
  • After run mysql query still no result and display 0 qty – Sylvester Mar 25 at 18:04
  • try to reindex now – Gianni Di Falco Mar 25 at 18:12
  • Working correct for all new products. Thank you, – Sylvester Mar 25 at 18:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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