$areas variable not set in search
- jameswadsworth
-
Topic Author
- Offline
Less
More
15 years 2 months ago #20121
by jameswadsworth
$areas variable not set in search was created by jameswadsworth
Joomla 1.5.23 - business 1.5.2
Hi there,
in the new categories plugin we noticed that we were not getting the manufacturer search results. On closer inspection neither the category results any more. In the onSearch function the $areas variable is not being passed so in line77 where we have the implode types we are getting nothing inserted.
We checked with the products search plugin and again the $areas variable in the onSearch plugin is not receiving any value. It does break anything here because it or and derivatives are used in the database query.
Can you replicate this??
Hi there,
in the new categories plugin we noticed that we were not getting the manufacturer search results. On closer inspection neither the category results any more. In the onSearch function the $areas variable is not being passed so in line77 where we have the implode types we are getting nothing inserted.
We checked with the products search plugin and again the $areas variable in the onSearch plugin is not receiving any value. It does break anything here because it or and derivatives are used in the database query.
Can you replicate this??
Please Log in or Create an account to join the conversation.
- jameswadsworth
-
Topic Author
- Offline
15 years 2 months ago #20125
by jameswadsworth
Replied by jameswadsworth on topic Re: $areas variable not set in search
Solved this problem by changing line 77 in the hikashop_categories.php file to:
$filters = array('a.category_published=1','(a.category_type=\'product\' OR a.category_type=\'manufacturer\')');
$filters = array('a.category_published=1','(a.category_type=\'product\' OR a.category_type=\'manufacturer\')');
Please Log in or Create an account to join the conversation.
15 years 2 months ago #20146
by nicolas
Replied by nicolas on topic Re: $areas variable not set in search
The solution is to change the code:
if(in_array('manufacturers',$valid)){
$types[]='\'manufacturer\'';
}
}
by:
if(in_array('manufacturers',$valid)){
$types[]='\'manufacturer\'';
}
}else{
$types[]='\'product\'';
$types[]='\'manufacturer\'';
}
in that file. Otherwise, the search area selected by the user will just be discarded.
if(in_array('manufacturers',$valid)){
$types[]='\'manufacturer\'';
}
}
by:
if(in_array('manufacturers',$valid)){
$types[]='\'manufacturer\'';
}
}else{
$types[]='\'product\'';
$types[]='\'manufacturer\'';
}
in that file. Otherwise, the search area selected by the user will just be discarded.
Please Log in or Create an account to join the conversation.
- jameswadsworth
-
Topic Author
- Offline
15 years 2 months ago #20160
by jameswadsworth
Replied by jameswadsworth on topic Re: $areas variable not set in search
Okay that solves that error. Thanks
Now we perform a search and click on category product link:
index.php?option=com_hikashop&ctrl=category&task=listing&name=liftkit&cid=84
we have the correct breakcrumb but a blank page. The same for the manufacturer search link:
index.php?option=com_hikashop&ctrl=category&task=listing&name=skyjackersuspension&cid=367
we don't have any breadcrumb and we a listing of the top level product categories.
I believe it is a question of configuration but I could find anything in the forums or documentation.
Now we perform a search and click on category product link:
index.php?option=com_hikashop&ctrl=category&task=listing&name=liftkit&cid=84
we have the correct breakcrumb but a blank page. The same for the manufacturer search link:
index.php?option=com_hikashop&ctrl=category&task=listing&name=skyjackersuspension&cid=367
we don't have any breadcrumb and we a listing of the top level product categories.
I believe it is a question of configuration but I could find anything in the forums or documentation.
Please Log in or Create an account to join the conversation.
15 years 2 months ago #20162
by nicolas
Replied by nicolas on topic Re: $areas variable not set in search
In the configuration of the search plugin, you need to set an id of a hikashop category listing menu in the itemid option.
Please Log in or Create an account to join the conversation.
- jameswadsworth
-
Topic Author
- Offline
15 years 2 months ago #20604
by jameswadsworth
Replied by jameswadsworth on topic Re: $areas variable not set in search
Hi this is not really working as we want to. We do not have a any parent 'manufacturer' category menu link. So if we put in any category menu id we list the product category instead. Any suggestions? Thanks
Please Log in or Create an account to join the conversation.
15 years 2 months ago #20633
by nicolas
Replied by nicolas on topic Re: $areas variable not set in search
We'll have to add a new option so that you can have a second listing id on the search plugin options. I've made the modifications and packaged a new plugin. If you install it on your website, it should enable you to do that and thus fix the problem with manufacturers.
This attachment is hidden for guests.
This attachment is hidden for guests.
Please log in or register to see it.
Please Log in or Create an account to join the conversation.
- jameswadsworth
-
Topic Author
- Offline
15 years 2 months ago #20653
by jameswadsworth
Replied by jameswadsworth on topic Re: $areas variable not set in search
thanks
Please Log in or Create an account to join the conversation.
Time to create page: 0.228 seconds