- Posts: 52
- Thank you received: 5
Exclude Order statuses from joomla search
14 years 6 months ago - 14 years 6 months ago #44102
by gxHL
Exclude Order statuses from joomla search was created by gxHL
As you can see in my demo site
shop.e-exelixi.gr/
if someone searches for (lets say) When
the search shows the results of Order statuses ... how can i exclude that from the search engine?
the search shows the results of Order statuses ... how can i exclude that from the search engine?
Last edit: 14 years 6 months ago by gxHL.
Please Log in or Create an account to join the conversation.
14 years 6 months ago #44361
by nicolas
Replied by nicolas on topic Re: Exclude Order statuses from joomla search
You can add the line:
$filters[]='a.category_type NOT IN (\'status\',\'tax\')';
before the line:
hikashop_addACLFilters($filters,'category_access','a');
in the file plugins/search/hikashop_categories.php
$filters[]='a.category_type NOT IN (\'status\',\'tax\')';
before the line:
hikashop_addACLFilters($filters,'category_access','a');
in the file plugins/search/hikashop_categories.php
Please Log in or Create an account to join the conversation.
14 years 6 months ago #44459
by gxHL
Replied by gxHL on topic Re: Exclude Order statuses from joomla search
added the change in plugins/search/hikashop_categories/hikashop_categories.php
Cleared browser/site cashe and nothing happen...
Cleared browser/site cashe and nothing happen...
Please Log in or Create an account to join the conversation.
14 years 6 months ago #44576
by nicolas
Replied by nicolas on topic Re: Exclude Order statuses from joomla search
Could you turn on the debug mode of joomla and train again ? Do you get an error message ?
If not, could you give the SQL query which is executed for the search on the page (search for queries of the table hikashop_category)?
If not, could you give the SQL query which is executed for the search on the page (search for queries of the table hikashop_category)?
Please Log in or Create an account to join the conversation.
14 years 6 months ago #44595
by gxHL
Replied by gxHL on topic Re: Exclude Order statuses from joomla search
Turned debugging mode on you can watch it online
shop.e-exelixi.gr/
also turned the default language to EN.
Please Log in or Create an account to join the conversation.
14 years 6 months ago - 14 years 6 months ago #44751
by nicolas
Replied by nicolas on topic Re: Exclude Order statuses from joomla search
Please change the lines:
to
in the file plugins/search/hikashop_category/hikashop_category.php and that should fix the problem.
Code:
$wordFilters[0]= '(' .implode( ($phrase == 'all' ? ') AND (' : ') OR ('),$subWordFilters1). ')';
$wordFilters[1]= '(' .implode( ($phrase == 'all' ? ') AND (' : ') OR ('),$subWordFilters2). ')';
$filters[] = '(' . implode( ') OR (', $wordFilters ) . ')';
if($multi){
$filters2[] = '(' . implode( ($phrase == 'all' ? ') AND (' : ') OR ('), $wordFilters2 ) . ')';
}
Code:
$wordFilters[0]= '((' .implode( ($phrase == 'all' ? ') AND (' : ') OR ('),$subWordFilters1). '))';
$wordFilters[1]= '((' .implode( ($phrase == 'all' ? ') AND (' : ') OR ('),$subWordFilters2). '))';
$filters[] = '((' . implode( ') OR (', $wordFilters ) . '))';
if($multi){
$filters2[] = '((' . implode( ($phrase == 'all' ? ') AND (' : ') OR ('), $wordFilters2 ) . '))';
}
Last edit: 14 years 6 months ago by nicolas.
Please Log in or Create an account to join the conversation.
14 years 6 months ago #44855
by gxHL
Replied by gxHL on topic Re: Exclude Order statuses from joomla search
Like a charm... thank you
Please Log in or Create an account to join the conversation.
Time to create page: 0.208 seconds