Magento 高级搜索 - 颜色下拉框 - 选项“全部”不来
我正在开发一个 magento 项目,其中已经构建了高级搜索页面。我有一个名为“颜色”的属性,具有以下值,并且还为高级搜索设置了属性“是”。
蓝色的 绿色的 黄色的。
我还更新了 mage/... 的 form.php,这样就会出现下拉框,而不是多选。
现在,在提前搜索颜色下拉列表中,我无法设置“全部”选项。我想要这个,因为当前蓝色是预先选择的,并且在每次搜索中都会添加此条件。我没有在其他页面进行任何更新。
请帮我。
杰夫
I am working on a magento project where advanced search page is already built. I have one attribute called "Color" having following values and also have made attribute property Yes for advance search.
Blue
Green
Yellow.
I also have updated form.php of mage/...so that instead of multiselect, drop down box will come.
Now, in advance search Color drop down, I am not able to set "All" option. I want this because currently Blue is preselected and in each search, this criteria is added. I have not done any updates in other pages.
Please help me.
Jeff
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
实际上这是一个非常有用的问题,@Jeff 的评论是一个很好的解决方案。
我以更好的格式报告它:
注释掉此代码:
并将其替换为:
Actually this is a vary useful question and @Jeff's comment is a great solution.
I report it with better formatting:
Comment out this code:
And replace it with this:
您可以轻松地为任何下拉属性(如颜色、制造商等)创建选择框,并用于搜索表单或任何自定义表单页面。
这是相关文章:
http ://www.blog.magepsycho.com/magento-utility-function-how-to-easily-create-select-box-for-drop-down-attributes
干杯!
You can easily create select box for any drop-down attributes like color, manufacturer etc and use for search form or any custom form page.
Here goes the related article:
http://www.blog.magepsycho.com/magento-utility-function-how-to-easily-create-select-box-for-drop-down-attributes
Cheers!!