Skip to main content

Exclude Order statuses from joomla search

More
14 years 6 months ago - 14 years 6 months ago #44102 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?
Last edit: 14 years 6 months ago by gxHL.

Please Log in or Create an account to join the conversation.

More
14 years 6 months ago #44361 by nicolas
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

Please Log in or Create an account to join the conversation.

More
14 years 6 months ago #44459 by gxHL
added the change in plugins/search/hikashop_categories/hikashop_categories.php
Cleared browser/site cashe and nothing happen...

Please Log in or Create an account to join the conversation.

More
14 years 6 months ago #44576 by nicolas
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)?

Please Log in or Create an account to join the conversation.

More
14 years 6 months ago #44595 by gxHL
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.

More
14 years 6 months ago - 14 years 6 months ago #44751 by nicolas
Please change the lines:
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 ) . ')'; }
to
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 ) . '))'; }
in the file plugins/search/hikashop_category/hikashop_category.php and that should fix the problem.
Last edit: 14 years 6 months ago by nicolas.

Please Log in or Create an account to join the conversation.

More
14 years 6 months ago #44855 by gxHL
Like a charm... thank you :)

Please Log in or Create an account to join the conversation.

Time to create page: 0.208 seconds
Powered by Kunena Forum