当我请求此网址时, https://localhost/index.php?route=product/search/ajax&keyword=brocco
opencart返回一个像
这样的产品对象[
{
"name":"Broccoli (Broccoli)",
"href":"https:\/\/localhost\/broccoli?keyword=brocco",
"image":"https:\/\/localhost\/image\/cache\/catalog\/product\/broccoli_new-47x47.jpg"
}
]
但我找不到产品/搜索/ ajax方法。
ajax
功能不在
catalog / controller / product / product.php (class ControllerProductProduct)
或catalog / controller / product / search.php (class ControllerProductSearch)
答案 0 :(得分:1)
如果product/search/ajax
文件中不存在方法catalog/controller/product/search.php
,那么这应该在以下文件中。
系统/修改/目录/控制器/产品/ search.php中