Magento分层导航类别 [英] Magento Layered Navigation Categories

查看:79
本文介绍了Magento分层导航类别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望用户在分层导航中单击类别时将其发送到类别登录页面.

I would like the user to be sent to the category landing page when the user clicks the category in layered navigation.

因此,当用户单击RedWidget类别时,他们会得到/category/RedWidget.html?cat=11,而不是用户得到/category.html?cat=11.

So instead of the user getting /category.html?cat=11, they would get /category/RedWidget.html?cat=11 when they click the RedWidget category.

我找到了此链接,但他的代码无效.

I found this link, but his code doesn't work.

提前谢谢!

推荐答案

如果我对您的理解正确,就会遇到类似的问题. 我最终的解决方法是同时显示left.phtml和分层导航,然后在分层导航中隐藏类别. (if($ showBlock& $ this-> __($ _ filter-> getName())!=类别"):)

If I understand you correctly, I came across a similar problem. My eventual fix was to display both the left.phtml and layered navigation at the same time, then hide the category in layered navigation. (if($showBlock && $this->__($_filter->getName()) != "Category"):)

然后在left.phtml中,我解析了$ _GET变量并将其附加到每个类别的URL字符串的末尾,以确保分层的导航搜索词在各个类别之间保持不变.

Then in left.phtml I parsed the $_GET variable and appended it to the end of the URL string for each category, ensuring that the layered navigation search terms persisted between categories.

稍微脏一点,但是可以完成工作.

Slightly dirty but it does the job.

这篇关于Magento分层导航类别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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