我正在创建一个Opencart 1.5.6& amp;我是opencart&的新手。 php所以请帮帮我
我搜索了很多,但所有结果都在谈论在SORT下拉列表中添加过滤器,如制造商..
但我不想排序,
我在产品中添加了一个名为COLOR的新自定义字段,我想创建一个包含RED,BLUE和&的新下拉列表。黑色选项,它将获得所有具有此颜色的产品。
我尝试创建一个下拉列表,例如“Sort By:”一个, 但我不能,因为我没有PHP或Opencart的经验。
请帮助我!!并提前感谢:)
答案 0 :(得分:1)
正如你所说,你是初学者,所以只需逐步完成
在Opencart中有一个名为filter的功能,它完全符合您的要求
**Step1 (Creating Filter)**
Admin panel>catalog>filter>Inset a new filter
->Filter Group Name "Color".
->click on add filter and add your colors "Red, Green, Blue...."
**Step2 (Adding Filter attribute to Product)**
Admin panel>catalog>products>edit product
->under the link tab there is a filter add the filter to product you want
eg if the product is red in color add "red"
->Do this to all product you wanted to be filtered.
**Step3 (Adding Filter Scope to category)**
Admin panel>catalog>categories>edit category
->under the data tab there is a filter add the filter you want to be displayed like "red, green etc.."
->Do this to all category you wanted filter to be displayed.
**Step4 (Enable Filter module or setting layout)**
Admin panel>Extensions>Modules
->Find Filter and click on install
->Now Edit the filter
->click on add module
->Set Layout to Category, Position to Content Top and Status to Enable
->Click on Save
现在你完成了,在类别中你可以看到类别中的过滤器功能
如果您仍然遇到困难,可以按照官方文档http://docs.opencart.com/display/opencart/Filters
进行操作希望这会有所帮助。