Magento Not Showing Products to Users who are Not Logged in

帅比萌擦擦* 提交于 2019-12-23 18:41:59

问题


Using Magento CE 1.7, I have uploaded multiple csv files to create categories, create a lot of products, and assign the products to the correct category. I don't know when precisely it happened, but about two weeks ago I noticed that the category listings pages would stop showing the products on the front-end. I have spent nearly half of the development time for this project trying to get the category pages to consistently show the products.

Today I noticed that, again, the category pages no longer showed the products. Once again I logged into the admin section and double checked that the products were active, in stock, had qty and that the indexes were refreshed (I have turned off caching so this was not an issue). When none of the usual fixes worked, I carried on to my original task of the day. I logged into the members area and did my tweaks there. It was then that I went back to the category pages and found that the products were back. By logging in and logging out I could make the category pages show / hide the products. I have been through the admin section looking for an option that may hide a product from a non-logged-in user but am unable to locate one.

Why do my products not show when a user is not logged in?


回答1:


Whilst going through through the customer groups section of the admin panel I noticed there was an entry for "NOT LOGGED IN" users. There was something suspicious with it, though. The ID was '5'. The other customer groups ascended from 1 to 3 and there was no entry with an id of 4.

My solution was to alter my database to set the id of the 'NOT LOGGED IN' customer group to 0:

 UPDATE customer_group SET customer_group_id = 0 WHERE customer_group_code = 'NOT LOGGED IN'


来源:https://stackoverflow.com/questions/11986167/magento-not-showing-products-to-users-who-are-not-logged-in

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!