10

I need some help I have added new products in the Backend and they are showing in the DB but not showing on the front page. Also, previously out of stock products are not showing as well after enabling them to be back in stock. I flushed cache and reindex as well without any success.

Has this got something to do with the Cron Job? If yes can someone guide me in the right direction on how to set up multiple cron jobs in cPanel?

I've one cron job running already isn't that enough?

12 Answers 12

15

In Magento 1, after every product uploaded, you need a re-index required.

In Magento 2 to run the Reindex, you should setup the cron job.

If you want reindex immediate then you should run php bin/magento indexer:reindex command from Terminal

2
  • 1
    Does not help either.
    – Black
    Commented Oct 7, 2020 at 13:38
  • I did but still not showing in category page. Do you have others ways?
    – huykon225
    Commented Feb 22, 2021 at 15:11
9
  1. Check product enable or not
  2. Assign product to websites
  3. Assign product to categories
  4. Change product stock status to in stock
  5. Check product visibility config
  6. Reindex and flush cache

Also check the Store View level.

3
  • I did all these things but still products are not showing in my frontend. I did reindexing also still no use? Commented Nov 12, 2020 at 5:02
  • Can you please help me with it? Commented Nov 12, 2020 at 5:02
  • Yup, in my case the product "although an old product, I just enabled it" was not assigned to a website and that's why it did not show. Thank yo for this little yet effective troubleshooting steps. Commented May 9, 2021 at 4:47
4

Showing products is not related to cron. Please open your admin panel > Manage product grid and pick any one id from Id column. For example id is 2. Now go to frontend of your site. after your site url just write: catalog/product/view/id/2 and it will show you the product with id 2 and may be you can get what exact error you are having.

2
  • I did all these things but still, products are not showing in my frontend. I did reindex also still no use? Commented Nov 12, 2020 at 5:03
  • Product is opening with help of URL but it is not showing in frontend and categories page. Commented Nov 12, 2020 at 5:04
2

You can use the CLI command to reset the status:

bin/magento indexer:reset

Or run this SQL command:

update indexer_state set status='invalid' where status ='working';

Then use this:

alias mage="php -d memory_limit=-1 -f bin/magento"
mage cache:flush &&
mage indexer:reindex;
1
  • bin/magento indexer:reset would probably be better than updating the SQL database directly
    – Barry
    Commented Nov 1, 2019 at 14:13
2

Something similar happened to me in Magento 2.4.3, products are visible in the Magento admin, but not in frontend.

We did everything we normally do, reindex, index: reset, cache, but nothing worked.

The problem was simpler than it seemed, on my site Magento has a versión of the product for the "default store view" and another for the "all store views"

The "All store views" version had everything enabled, but the "default store view" version did not, correcting this, the problem was solved.

I hope someone can use this solution that worked for us.

Greetings

1
  • 1
    Wish I read this comment a good hour sooner. I've used 'Save & Duplicate' and this was exactly the issue I had. Commented Oct 6, 2021 at 13:01
1

There are various configuration options for showing products that are out of stock.

By default with Magento 2.2.2, new products indicated as being 'in stock' but having a quantity of zero will not appear in search results.

To disable inventory for your product if that's the issue, click 'Advanced Inventory' then underneath the 'Manage Stock' dropdown uncheck the 'Use Config Settings' checkbox and then set it to 'No'.

After one more re-index your product should now show up in the site search results.

1

check out https://github.com/Itonomy/magento2-product-visibillitygrid. It will show all "conditions" for a product to show and a function to reindex it, when needed. Good luck!

1

You need reindex data after add new product

0

caused by index not right for this product.

Solution: run following commands:

php bin/magento indexer:reset
php bin/magento indexer:info
php bin/magento indexer:status
php bin/magento indexer:reindex
0

As the product informations are stored in multiple tables in Magento, When you add a new product or do some major changes in product configurations. You have to do the following steps : php bin/magento indexer:reindex php bin/magento cache:flush

-1

Run following commands:

-php bin/magento ca:cl

-php bin/magento ca:fl

-php bin/magento indexer:reindex

-php bin/magento se:up && chmod -R 777 var/ pub/ generated/

If it did not solve the issue check the product view widget capacity and increase it.

1
  • chmod 777 is a very bad idea because it opens a security hole.
    – Black
    Commented Oct 7, 2020 at 13:27
-1

There can be different reasons why your products are not visible or in stock in frontend. Here are the things you can try to debug it:

In general, the issue gets fixed after your run indexing and clear cache.

You can run indexing from terminal using command

bin/magento indexer:reindex

You can clear cache from admin panel at System => Tools => Cache Management You can also clear cache using command:

 bin/magento cache:clean

If issue still exists, use below techniques to find the issue.

  • Try to load the product using URL which you can get in search engine optimization section of the product page in admin.
  • Check if the product is enabled or not.
  • Check if the product is assigned to website you are browsing from frontend or not.
  • Check if the product is assigned to category you are browsing or not.
  • Check if the product having quantity and salable quantity or not.
  • Check product stock status and change product stock status to in stock.
  • Check product visibility config. Make sure visibility is set to Catalog, Search
  • Check the website or Store View level config and make sure above settings are also correct on website/store level.
  • If you are using configurable and associated products, make sure at least one of the child products has salable quantity and previously mentioned attributes enabled for that simple product.
  • Are you using multi source inventory? Make sure salable quantity is available in at-least one source location.

If the issue still remains, there are other things you might look into.

  • Do you have custom modules in your project? Disable them to check. It might be that any of the custom modules might be causing the issue.
  • Save the product again and run indexing and cache clean. Might be any catalog table is not updated properly when you have created the product for the first time or imported product using System import feature. This can be helpful when you have created products programmatically instead of using default product creation feature.
  • Are you using any other third caching application? Flush them and check.

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.