Hi dear
I tried 2 below code that you said on ver 3.7.4 but not worked :
<?php
function cust_withpattern_no_results() {
if (Params::getParam('sPattern') && !Search::newInstance()->count()) {
$currentParams = Params::getParamsAsArray();
unset($currentParams['sPattern']);
$message = sprintf(__('There are no results matching "%s"', osc_theme()), osc_search_pattern());
osc_add_flash_info_message($message);
$url = osc_search_url($currentParams);
header("Location: ".$url);
exit;
}
}
osc_add_hook("after_search", "cust_withpattern_no_results" );
?>
and
<?php
function cust_withpattern_no_results() {
// if (!Search::newInstance()->count()) {
if (Params::getParam('sPattern') && !Search::newInstance()->count()) {
$currentParams = Params::getParamsAsArray();
unset($currentParams['sPattern']);
$message = sprintf(__('There are no results matching "%s"', osc_theme()), osc_search_pattern());
osc_add_flash_info_message($message);
$url = osc_search_url($currentParams);
header("Location: ".$url);
exit;
}
}
osc_add_hook("after_search", "cust_withpattern_no_results" );
?>