Heavily filtered search - how?

  • Posts: 60
  • Thank you received: 0
11 years 7 months ago #97040

Hello,

I do not understand how to do the following, I read the documentation but it hasn't really helped.

I want to give products certain properties and then be able to make a filtered search based on that.

Am I supposed to make a new filter or a new custom field?

For example, I want to give these options:

1) radio boxes (red, green, blue)
2) price range (2 text boxes so user inputs both prices to search inbetween)

that would be enough for the beginning, I just want to see how it's done.

I made a category with 4 products, I made the category link appear on the front page so all that is well, I just don't know how to add and search custom properties.

Thanks

///////////// UPDATE ///////////////

OK I think I gave custom fields to products that work, I added a new custom field for table product, chose a category and basically the option to choose something showed up in the specific product options.

But how do I connect filters to that? I made a new radio buttons filter (hopefully), I applied it on CUSTOM FIELDS (is that what I am supposed to do?), and I made the filter module appear but it is giving an error message of "Warning: Invalid argument supplied for foreach() in C:\Program Files (x86)\EasyPHP-5.3.8.1\www\hikashop\administrator\components\com_hikashop\classes\filter.php on line 1188"

Last edit: 11 years 7 months ago by Dzumla.

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

  • Posts: 12953
  • Thank you received: 1778
11 years 7 months ago #97336

Hi,

I think that you can do it by :

1. Creating a filter with :
- The type option set to "Radio button"
- The Apply on option set to "Characteristics"
- The Characteristic option set to your caracterstic "color" for example

3. Creating a filter with :
- The type option set to "multiple dropdown"
- The Apply on option set to "price"

Hope this will help you a little.

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

  • Posts: 60
  • Thank you received: 0
11 years 7 months ago #97373

Hello,

I did what you said but I can't really test it as I am still getting the warning php error:

Warning: Invalid argument supplied for foreach() in C:\Program Files (x86)\EasyPHP-5.3.8.1\www\hikashop\administrator\components\com_hikashop\classes\filter.php on line 1188

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

  • Posts: 12953
  • Thank you received: 1778
11 years 7 months ago #97386

Do you you have the last version of Hikashop ?

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

  • Posts: 60
  • Thank you received: 0
11 years 7 months ago #97390

Yes, and PHP 5.3.8

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

  • Posts: 82785
  • Thank you received: 13353
  • MODERATOR
11 years 7 months ago #97560

The message

Warning: Invalid argument supplied for foreach() in C:\Program Files (x86)\EasyPHP-5.3.8.1\www\hikashop\administrator\components\com_hikashop\classes\filter.php on line 1188

means that you added a custom field or characteristic without any values configured in it. Please make sure that you set values in the custom field/characteristic.

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

  • Posts: 60
  • Thank you received: 0
11 years 7 months ago #97590

There is some miscommunication here.

1) I have a category with three products.

2) I made ONE custom field in table PRODUCT with a field type of RADIO BUTTON and gave 3 default values of RED, GREEN and BLUE, AND I added the category I made to this custom field.

3) I then went back to my products, and at the BOTTOM of each one the option to choose from the radio button options I made earlier appeared, and I chose a different color for each of the 3 products, for the first product i chose red, second green and third blue (I also clicked on characteristics but nothing was there, was there supposed to be something there ?????????????? )

4) I then made a filter with a type of Radio Button and and applied it on CHARACTERISTICS (as Mohamed suggested) - also, when I applied it on characteristics, the characteristics dropdown was EMPTY

5) I then made a filter module and added the filter I just made to it, made it appear on the front page and it gave me the error I already said.

/////////////////////////////////////////////////

Those are my exact steps, so what do you mean by "custom field or characteristic without any values" ?

I think the problem is with no characteristics in product options, but I don't know how to get them there (as I said when i click on characteristics in product options, it's empty).

Also, I would prefer to filter by searching thru the custom fields, not characteristics (whatever that is)

Please advise

//////////////////////////
WHAT I WANT TO DO - in case what i want to do or i am doing something wrong - here it goes:

Like I said I have just 3 products, I want the first of them to be searchable by clicking on red radio box, second by clicking blue, and third by clicking green.

Last edit: 11 years 7 months ago by Dzumla.

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

  • Posts: 82785
  • Thank you received: 13353
  • MODERATOR
11 years 7 months ago #97771

Hi,

There was indeed some miscommunication here.

Either you use a characteristic and in that case you create a filter on that characteristic, or you use a custom product field and in that case you create a filter on that custom field.
Since you created a filter on a characteristic without any characteristic created or selected you got that error.

So the solution is simple. Edit your filter and change it to apply on your custom field and it should work.

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

  • Posts: 60
  • Thank you received: 0
11 years 7 months ago #97785

Hello,

There is no error message now, I get 3 radio boxes but I get no results returned.

The URL looks like this: http://127.0.0.1:8887/hikashop/index.php/component/hikashop/product/listing?Itemid=0

What's the problem?

(as i already said, I have 1 custom radio buttons field with 3 values and 3 products and I chose different one for each product in product settings)

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

  • Posts: 82785
  • Thank you received: 13353
  • MODERATOR
11 years 7 months ago #97797

Itemid=0 means that you didn't configure a products listing menu item id in the "menu" option of your filter module. That's why you don't get any results.

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

  • Posts: 60
  • Thank you received: 0
11 years 7 months ago #97802

I think I enabled products listing, but now I get the category link (the one where my 3 products are) as the search result, regardless of whether I choose red, green or blue.

This is the url: http://127.0.0.1:8887/hikashop/index.php/hikashop-menu-for-products-listing/category

(I'm guessing we're almost there :) )

/////////////// UPDATE //////////////////////////////

Instead of insisting on making a category listing content menu, I made a new menu item and assigned product listing of the appropriate category to it, and it works.

I still think it should've worked with category listing content module, but this works for me as well.

So far so good!

Thanks

Last edit: 11 years 7 months ago by Dzumla.

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

  • Posts: 82785
  • Thank you received: 13353
  • MODERATOR
11 years 7 months ago #97935

It works with the category listing menu too. It's just that you don't have any products in your main category, so the search page is always empty.
That's why I recommended to use a products listing menu :)

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

Time to create page: 0.085 seconds
Powered by Kunena Forum