How do you create an Alpha Index for filtering?

  • Posts: 53
  • Thank you received: 2
12 years 2 months ago #63151

I would like to create an alpha index for filtering products. See the attached image.

What would be the steps needed to create this?

Attachments:

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

  • Posts: 82818
  • Thank you received: 13361
  • MODERATOR
12 years 2 months ago #63378

Hi,

You would need to create a custom field of the table "product" and of the type "dropdown" with one value per letter.
Then, in each product you would have to set that value.
Then, create a filter of the type "list" applied on that custom field and it will display a list of links with one value per value of the custom field on your products listings.
The only thing is that it will have one value per line, so you will need a piece of CSS to have them display on one line. Nothing complicated.

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

  • Posts: 53
  • Thank you received: 2
12 years 2 months ago #63398

Thanks so much Nicolas. I have gotten the filter displaying on value per line, now I am trying to find where to modify the css. There is a class created, but I am thinking it would be better to make each letter part of a list and style the list accordingly. Also, any suggestions on how to make the filter display on one line as opposed to a list?

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

  • Posts: 53
  • Thank you received: 2
12 years 2 months ago #63445

Nevermind. I found the file in question:

administrator/components/com_hikashop/classes/filter.php

The main culprit was the </br>. After I deleted that from the filter I had no more issues.

Thanks!

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

  • Posts: 82818
  • Thank you received: 13361
  • MODERATOR
12 years 2 months ago #63453

You should do that with CSS, like that:

.hikashop_filter_main_div br{ display:none; }

That way, you won't have to do it each time you update HikaShop.

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

  • Posts: 53
  • Thank you received: 2
12 years 2 months ago #63548

Good point.

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

  • Posts: 65
  • Thank you received: 0
12 years 4 weeks ago #70581

Hi Nicolas, could you help me?
I have the same request but your explanations are not enough for me.. could you explain some more details on how I have to set up the custom field and the custom filter? There are so many options..
In the filter for example, I can only refer to "custom field" in general but not to the actual alpha index custom field that I created..

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

  • Posts: 82818
  • Thank you received: 13361
  • MODERATOR
12 years 4 weeks ago #70694

Hi,

If you set the "apply on" option of the filter to "custom field", you will then see a dropdown with the list of your custom fields of the table "product". If you don't see yours there, it means that you didn't configure it properly.

If you could post screenshots of your custom field/filter, we could tell you what is wrong.

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

Time to create page: 0.079 seconds
Powered by Kunena Forum