Magento未向未登录的用户显示产品 [英] Magento Not Showing Products to Users who are Not Logged in

查看:40
本文介绍了Magento未向未登录的用户显示产品的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Magento CE 1.7上传了多个csv文件来创建类别,创建大量产品并将产品分配给正确的类别.我不知道它是什么时候发生的,但是大约两周前,我注意到类别列表页面将停止在前端显示产品.我在这个项目上花费了将近一半的开发时间,试图使类别页面始终如一地显示产品.

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.

今天我再次注意到,类别页面不再显示产品.我再次登录到admin部分,并仔细检查了该产品是否处于活动状态,有库存,数量是否充足以及索引是否已刷新(我已关闭缓存,因此这不是问题).当所有常规修复都不起作用时,我继续进行当日的原始任务.我登录到会员区并在那里进行了调整.那时我回到类别页面,发现产品又回来了.通过登录和注销,我可以使类别页面显示/隐藏产品.我一直在管理"部分中寻找一个选项,该选项可能会向未登录的用户隐藏产品,但无法找到该产品.

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?

推荐答案

在浏览管理面板的客户组"部分时,我注意到有一个"NO LOGGED IN"用户的条目.不过,有一些可疑之处. ID为"5".其他客户组从1上升到3,并且没有ID为4的条目.

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.

我的解决方案是更改数据库,以将未登录"客户组的ID设置为0:

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'

这篇关于Magento未向未登录的用户显示产品的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆