Magento:设置并存储全局产品过滤器

发布于 2024-10-22 18:10:32 字数 362 浏览 7 评论 0原文

在Magento中,当选择新类别或执行搜索时,如何保留分层导航选择?

全文:

我们正在开发一家销售书籍和电子书的商店。当我浏览商店时,我通常想查看所有产品。我还希望能够查看一个类别,并且只查看书籍或电子书。这可以通过属性“产品类型”和分层导航轻松实现。

但是,问题是,如果我选择另一个类别或执行搜索,当前的分层导航过滤器就会丢失。我必须再次选择“产品类型”过滤器。

如果我想在多个请求之间保持分层导航,我有什么选择?

如果我想要的内容无法通过分层导航轻松实现,是否有关于如何最好地组织我的目录的建议?图书和电子书的两个顶级类别是否是更好的解决方案?但是,我怎样才能选择“浪漫”类别并仍然看到书籍和电子书呢?

谢谢!

In Magento, how can layered navigation selection be kept when a new category is selected or a search is performed?

Full story:

We're developing a store which sells Books and eBooks. When I am navigating the store I generally want to see all products. I also want to be able to view a category and only see the Books or the eBooks exclusively. That can be easily achieved with an attribute "Product Type" and Layered Navigation.

However, the problem is that if I select another category or perform a search, the current layered navigation filter is lost. I have to select the "Product Type" filter again.

What are my options if I want to keep the layered navigation across multiple requests?

Are there any suggestions on how to best organize my catalog if what I want can't be easily achieved with layered navigation? Would two top level categories for Books and eBooks be a better solution? But then how could I select the "Romance" category and still see Books and eBooks?

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

尴尬癌患者 2024-10-29 18:10:32

分层导航绝对是实现您的要求的最佳方式。

查看当您单击分层导航块中的属性值时生成的 URL(类似于 your-category-path.html?color=6,其中 6 是属性选项 ID)。如果您将这些查询参数附加到包含分层导航块和产品集合(例如类别或搜索结果列表)的后续页面加载中,它将应用该过滤器。

Layered Navigation is definitely the best way to achieve your requirement.

Look at the URLs that are generated when you click an attribute value from the layered navigation block (it will something like your-category-path.html?color=6 where 6 is the attribute option ID). If you append those query params to your subsequent page loads that contain layered navigation blocks and product collections (e.g. category or search result listings), it will apply that filter.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文