cs-cart在前端搜索中设置sort参数的位置是什么?

问题描述 投票:0回答:1

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

有人可以帮忙吗?

php cs-cart
1个回答
0
投票

查看功能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
© www.soinside.com 2019 - 2024. All rights reserved.