自定义属性不会显示在产品列表视图中 Magento
我试图在我们的产品列表页面上显示某些自定义属性。为此,我按照 Magento Commerce 论坛上的说明进行操作,并测试了此方法的工作原理。我无法发布链接,因为我只能作为新用户发布两个链接。
我们正在使用自定义模板。因此,我添加了文件夹结构“/app/design/frontend/yardandpool/yap/template/catalog/product”,然后将新的“list.phtml”文件上传到产品文件夹。然后,在该类别管理部分的“自定义设计”下,我选择了自定义模板文件夹。
我试图显示的属性是特定产品的“Key #”。它应显示在产品名称上方。正如您在这里看到的,它不......
但是,然后我创建了一个自定义模板文件夹复制到“base”文件夹。我创建了“/app/design/frontend/base/yardandpool/template/catalog/product”并将相同的“list.phtml”文件放入产品文件夹中。然后,我创建了第二个测试类别,并在管理部分中为“自定义设计”选择了该文件夹。显然,布局不正确,但是如果您向下滚动到产品所在的位置,您将看到显示自定义属性“Key #”。
原因是什么会显示在这里,但不会显示在两个类别页面上?我似乎无法找出问题所在。
I am attempting to display certain custom attributes on our product list page. To do this I have followed the instructions on the Magento Commerce forum and have tested this method to work. I can't post a link since I am only allowed to post two links as a new user.
We are using a custom template. So I added the folder structure “/app/design/frontend/yardandpool/yap/template/catalog/product” and then uploaded the new “list.phtml” file to the product folder. Then, under “Custom Design” in the admin section for the category I have the custom template folder selected.
The attribute I am trying to display is a “Key #” for the particular product. It should display above the product name. As you can see here, it does not…
But, then I created a custom template folder to the “base” folder. I created “/app/design/frontend/base/yardandpool/template/catalog/product” and put the same “list.phtml” file in the product folder. I then created a second test category and selected this folder for the “Custom Design” in the admin section. Obviously, the layout is not correct, but if you scroll down to where the product is located you will see the custom attribute “Key #” is displayed.
What would be the reason it would be displayed here but not on both category pages? I can’t seem to find out what the problem is.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
属性有一个选项“在产品列表中使用(取决于设计主题)”,需要检查该选项是否在产品列表中使用。
之所以使用此功能,是因为产品具有许多类别页面上不需要的属性,因此将其卸载以节省时间。
Attributes have an option "Used in Product Listing (Depends on design theme)" that needs to be checked to be, err, used in product lists.
The reason for this feature is products have many attributes that aren't needed on category pages and so are left unloaded to save time.