$areas variable not set in search

  • Posts: 272
  • Thank you received: 3
  • Hikashop Business
13 years 4 months ago #20121

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??

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

  • Posts: 272
  • Thank you received: 3
  • Hikashop Business
13 years 4 months ago #20125

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\')');

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

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
13 years 4 months ago #20146

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.

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

  • Posts: 272
  • Thank you received: 3
  • Hikashop Business
13 years 4 months ago #20160

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.

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

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
13 years 4 months ago #20162

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.

  • Posts: 272
  • Thank you received: 3
  • Hikashop Business
13 years 4 months ago #20604

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.

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
13 years 4 months ago #20633

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.

File Attachment:

File Name: hikashop_c...ries.zip
File Size:3 KB

Attachments:

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

  • Posts: 272
  • Thank you received: 3
  • Hikashop Business
13 years 4 months ago #20653

thanks

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

Time to create page: 0.072 seconds
Powered by Kunena Forum