重新排序工具栏中的排序顺序
对产品列表工具栏中显示的可用排序顺序重新排序的最佳方法是什么?目前,我们有 3 种排序选项:名称、价格、最受欢迎(按此顺序)。我希望“最受欢迎”成为最左边的项目,因为它是我们的默认排序选项。我可以编写一个自定义模块来扩展“getAvailableSortOrders”或类似的东西,但我认为必须有一种更简单的方法。有人有推荐吗?
布莱恩
What is the best way to re-order the available sort orders shown in the product list toolbar? Currently, we have 3 sorting options available: Name, Price, Most Popular (in that order). I want to have Most Popular be the left-most item since it is our default sort option. I can write a custom module to extend "getAvailableSortOrders" or something like that, but I thought there had to be an easier way. Anyone have a recommendation?
Brian
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
到目前为止我发现的最好方法是复制
位于
,然后在第 341 行编辑文件的本地副本,
我希望名称位于第一个,然后是价格,我想要位置在前端重命名为“Best Value”。因为位置对客户来说实际上没有任何意义。
我受到 此评论的启发。
The best way I've found so far is to make a copy of
at
and then edit your local copy of the file at line 341
I wanted name to be first, followed by price, and I wanted position to be renamed "Best Value" on the frontend. Since position wouldn't really mean anything to a customer.
I was inspired by this comment on Inchoo.
@jon.niesen:你的解决方案仅部分有效。我在重命名“位置”时没有遇到任何问题,但是当涉及到重命名“名称”时,Magento 对此非常顽固,并且仍然在选择下拉框中显示“名称”。
也许在 1.4.1.1 中“名称”是硬编码的还是什么?
@jon.niesen: your solution worked only partially. I had no problems renaming 'position' but when it comes to renaming 'name', Magento was very stubborn on this and was still displaying "Name" in the select drop down box.
Maybe in 1.4.1.1 "Name" is hardcoded or something?