Exclude Order statuses from joomla search

  • Posts: 52
  • Thank you received: 5
12 years 10 months ago #44102

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: 12 years 10 months ago by gxHL.

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

  • Posts: 83103
  • Thank you received: 13418
  • MODERATOR
12 years 10 months ago #44361

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.

  • Posts: 52
  • Thank you received: 5
12 years 10 months ago #44459

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.

  • Posts: 83103
  • Thank you received: 13418
  • MODERATOR
12 years 9 months ago #44576

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.

  • Posts: 52
  • Thank you received: 5
12 years 9 months ago #44595

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.

  • Posts: 83103
  • Thank you received: 13418
  • MODERATOR
12 years 9 months ago #44751

Please change the lines:

$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
$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: 12 years 9 months ago by nicolas.

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

  • Posts: 52
  • Thank you received: 5
12 years 9 months ago #44855

Like a charm... thank you :)

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

Time to create page: 0.067 seconds
Powered by Kunena Forum