4

I am facing an issue that categories are not showing products. Some categories are showing product but I assigned 3 products to a category and it's showing me only 1 and some categories are not showing a single product. I checked

  1. Product status as Enabled
  2. Product Visibility as catalog, search
  3. Product quantity > 0
  4. Product inventory as In Stock
  5. Product price > 0

For category :

  1. Is Active as Yes
  2. Display Mode as Product Only
  3. In the category products tab, it's showing all the products that are assigned to the category.

But it is not showing on the category page on front-end.

I am using SM Market theme.

Can anyone help to get this issue fixed?

5

Check below list

If below things are done.

1.General->Status = Enabled

2.general->Visibility = Catalog,Search

3.Inventory->Qty > 0

4.Inventory->Stock Availability = In Stock

5.Websites = checking your site

6.Catgories = checking your category.

You have to remove var folder from root and try commands using cli:

php bin/magento setup:static-content:deploy
php bin/magento indexer:reindex

Clear browser cache and try again.

  • 1
    Removing var folder will not effect my site??? – Thomas Sep 12 '16 at 6:09
  • Normally it doesn't effect unless there is some error. You can first try on local site then try on live for safety. – Arjun Sep 12 '16 at 6:15
  • Hi i tried above commands. After running php bin/magento setup:static-content:deploy , i get Fatal Error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 9611362 bytes). – Thomas Sep 14 '16 at 11:46
  • Found solution for error. used php -dmemory_limit=6G bin/magento setup:static-content:deploy and change 6G to what you want. After that run the second command php bin/magento indexer:reindex. Now its working fine... – Thomas Sep 14 '16 at 11:59
  • If you have Varnish make sure page is purged – CompactCode Apr 13 '18 at 9:29
1

For me its due to following error:-

Base table or view not found 1146 table 'inventory_stock_1' doesn't exist

solution is to create view may be on server due to permission to DB user this view not created, need to create like following:

CREATE ALGORITHM=UNDEFINED DEFINER=`dbusername`@`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 (`dbname`.`cataloginventory_stock_status` `legacy_stock_status` join `dbname`.`catalog_product_entity` `product` on((`legacy_stock_status`.`product_id` = `product`.`entity_id`)));
0

If you add your product programmatically, don't forget to add :

$product->setWebsiteIds(array($yourWebsiteId))

or it will not appears in front website.

0

Please check product salable quantity, This issue can come if the salable quantity is zero to fix that please make sure you have a view table inventory_stock_1 in your database.

This issue can come if you have migrated database from one to another so that time you may be missed to migrate view tables.

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.