Magento - 将属性与子类别链接或在导航中包含属性值
我正在创建一个视频游戏电子商务商店,我需要构建导航结构,以便导航栏包含所有主要控制台。当有人将鼠标悬停在控制台导航链接之一上时,会出现一个下拉菜单,其中包含每个流派选项。例如,一旦您将鼠标悬停在 Xbox 360 上,就会显示包含“动作”、“冒险”等内容的下拉菜单。
我的第一个想法是在每个主要类别中创建代表每种类型的子类别。还有一个流派的自定义属性字段。然后,我必须手动导出产品数据库并为每个产品填写该数据库。
有没有一种我不知道的更简单的方法可以做到这一点?是否可以将属性作为导航栏中的下拉菜单链接?
我在“管理属性”部分注意到的一件事是“在分层导航中使用”选项。据我所知,这链接了侧边栏中的属性,而不是主导航栏中的属性。
作为参考,我的网站位于 http://allyourga.me
I'm creating a video game ecommerce store and I need to have the navigation structured so that the navigation bar contains all the major consoles. When someone hovers over one of the console navigation links, a drop down menu appears with each genre option. For example, once you hover over Xbox 360, a drop down menu with Action, Adventure, etc. will show up.
My first thought is to create sub-categories in each major category that represent each genre. There would also be a custom attribute field for genre. I would then have to manually export the product database and fill it in for each product.
Is there an easier way to do this that I don't know about? Is it possible to have attributes as the drop-down menu links in the navigation bar?
One thing I've noticed in the Manage Attributes section is the option to Use in Layered Navigation. As far as I can tell, this links the attribute in the sidebar and not the main navigation bar.
For reference, my website is at http://allyourga.me
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
没有默认功能可以执行您所描述的操作。 Magento 的默认方式是通过子类别来实现这一点。您对分层导航的看法是正确的,这是目录内的侧边栏功能。
您可以围绕在下拉菜单中显示属性进行一些自定义编码,但下拉链接无论如何都会指向类别,因此您无论如何都需要创建这些属性。另一种方法是使用 cronjob,为产品创建必要的类别,并根据命令将它们放入这些类别中。您还需要添加一个“控制台”属性才能使其正常工作。
希望有帮助!
谢谢,
乔
There is no default functionality to do what you are describing. The default Magento way to accomplish this is via subcategories. You are correct about Layered Navigation, that is a sidebar feature inside the catalog.
You could do some custom coding around showing the attributes in the dropdown menu, but the dropdown links lead to categories anyway, so you'd need to create those regardless. Another approach would be a cronjob that created the necessary categories for the products and placed them into those categories on command. You'll need to add a "console" attribute to make this work as well.
Hope that helps!
Thanks,
Joe