繁体   English   中英

cs-cart在前端搜索中的哪里设置排序参数?

[英]Where does cs-cart set the sort parameter in the frontend search?

在CS-Cart版本4.8.2.SP2中,我试图编辑前端常规搜索排序的参数。 我试图找到在代码中设置的位置,以便可以找到要使用的钩子和所需的格式。

有人可以帮忙吗?

fn_search出函数fn_search ,它应该包含所有必要的信息;

您可能要使用的钩子是: additional_fields_in_search

在hookbase( https://helpdesk.cs-cart.com/api )中,其原型如下:

Executed for each part of a search query; it allows to modify the SQL conditions of the search
$params     array     List of parameters passed to fn_get_products functions
$fields     array     List of fields for retrieving
$sortings   array     Sorting fields
$condition  string    String containing SQL-query condition possibly prepended with a logical operator (AND or OR)
$join       string    String with the complete JOIN information (JOIN type, tables and fields) for an SQL-query
$sorting    string    String containing the SQL-query ORDER BY clause. This variable isn't used; it remains only for backward compatibility.
$group_by   string    String containing the SQL-query GROUP BY field. This variable isn't used; it remains only for backward compatibility.
$tmp        string    String containing SQL-query search condition by piece
$piece      string    Part of the search query
$having     array     HAVING condition

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM