如何显示所有类别中具有特定属性 = 特定值的所有产品?
所以基本上我的 Magento 商店销售许多不同类别的 T 恤(不是真的)。所有 T 恤,无论类别如何,都有 颜色 属性 = 红色、蓝色、绿色等。
我希望能够链接到蓝色页面产品,或红色产品等,并显示所有产品,无论父类别如何。
想法?谢谢。我真的不想手动将它们全部添加到另一个类别。
So basically my Magento store sells t-shirts (not really) in a bunch of different categories. All t-shirts, regardless of category, have the color attribute = to either red, blue, green, etc.
I want to be able to link to a page for blue products, or red products, etc, and show them all regardless of parent category.
Thoughts? Thanks. I'm really not trying to add them all to another category manually.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
尝试一下 Yoast 的着陆页扩展。正如他们的博客中所述,您将能够创建包含产品的 CMS 页面按您创建的任何属性过滤的列表。
例如,要列出所有黑色产品,您可以使用类似的内容(此处值“black”的 id 为 24):
由于它是 CMS 页面,您还可以自定义 url 以具有类似以下内容:<代码>http://www.yourdomain.com/all-black-products.html。
magentoconnect 中的描述说它只与 1.4 兼容,但我使用的是 1.5,我不记得是否需要更改代码。
华泰
Give the Yoast's Landing Pages extension a try. As explained in their blog, you'll be able to create CMS pages that contains products listings filtered by any attribute you have created.
For example, to list all black products, you'd use something like (here the value "black" has id of 24):
And as it is a CMS page, you'll also can customize the url to have something like:
http:/www.yourdomain.com/all-black-products.html
.The description in magentoconnect says it's only compatible with 1.4, but I'm using with a 1.5, I can't remember if I had to change the code or not though.
HTH
将它们全部链接到特定类别并使用导航过滤器
link them all to specific category and use navigation filters
您可以按属性值过滤产品。只需使用 addAttributeToFilter
希望这会有所帮助。谢谢。
You can filter products by attribute value.. simply by using addAttributeToFilter
Hope this helps. Thanks.