8

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?

11 Answers 11

12

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
    Oct 7 '20 at 13:38
  • I did but still not showing in category page. Do you have others ways?
    – huykon225
    Feb 22 at 15:11
7
  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? Nov 12 '20 at 5:02
  • Can you please help me with it? Nov 12 '20 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. May 9 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? Nov 12 '20 at 5:03
  • Product is opening with help of URL but it is not showing in frontend and categories page. Nov 12 '20 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
    Nov 1 '19 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
  • Wish I read this comment a good hour sooner. I've used 'Save & Duplicate' and this was exactly the issue I had. Oct 6 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
    Oct 7 '20 at 13:27

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.