Hi,
I am trying to make Quick search by ‘all of these these words’ [url]CS-Cart Documentation — CS-Cart 4.16.x documentation but unsuccessfully. After change It still search by any word. Who know what is the problem?
Did you clear the cache after making changes
John
[quote name=‘johnbol1’]Did you clear the cache after making changes
John[/QUOTE]
Yse, i did but it doesn’t help. I try to put code 2 times in defferent places but it stiil doesn’t work. This is part of my fn.catalog.php
```php
$join = $condition = $inventory_condition = ‘’;
// Added by xeddin for search by all these words
if (empty($params[‘match’])) {
$params[‘match’] = ‘all’;
}
// End:
$condition .= fn_get_company_condition(‘products.company_id’);
if (isset($params[‘company_id’]) && $params[‘company_id’] != ‘’) {
$params[‘company_id’] = intval($params[‘company_id’]);
$condition .= db_quote(’ AND products.company_id = ?i ‘, $params[‘company_id’]);
}
if (AREA == ‘C’) {
if (fn_check_suppliers_functionality()) {
// if MVE or suppliers enabled
$condition .= " AND (companies.status = ‘A’ OR products.company_id = 0) “;
} else {
// if suppliers disabled
$condition .= fn_get_company_condition(‘products.company_id’, true, ‘0’, false, true);
}
}
$join .= db_quote(” LEFT JOIN ?:companies companies ON companies.company_id = products.company_id “);
$join .= db_quote(” LEFT JOIN ?:product_descriptions as descr1 ON descr1.product_id = products.product_id AND descr1.lang_code = ?s ", $lang_code);
// Added by xeddin for search by all these words
if (empty($params[‘match’])) {
$params[‘match’] = ‘all’;
}
// End
// Search string condition for SQL query
if (isset($params[‘q’]) && fn_string_no_empty($params[‘q’])) {
$params[‘q’] = trim($params[‘q’]);
if ($params[‘match’] == ‘any’) {
$pieces = fn_explode(’ ', $params[‘q’]);
$search_type = ’ OR ‘;
} elseif ($params[‘match’] == ‘all’) {
$pieces = fn_explode(’ ', $params[‘q’]);
$search_type = ’ AND ';
```
Maybe I need to put it in defferent place?