A-Z keyword index

  • Posts: 173
  • Thank you received: 14
  • Hikashop Business
6 years 10 months ago #272154

-- url of the page with the problem -- : ccpharmacy.com.au/index.php/product-categories
-- HikaShop version -- : 3.1.1
-- Joomla version -- : 3.7
-- PHP version -- : 5.4.45
-- Browser(s) name and version -- : Opera 45

Hi, is it possible to set up an A-Z index based on the keywords or titles of categories and products?

Regards,
Ian and Stu

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
6 years 10 months ago #272162

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 173
  • Thank you received: 14
  • Hikashop Business
6 years 10 months ago #272171

You've link me through to my own original question. Is there another thread i should be viewing/

Thanks,
Ian & Stu

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

  • Posts: 173
  • Thank you received: 14
  • Hikashop Business
6 years 10 months ago #272188

Hi,
this is also different from the other question because I'm talking about a separate view using the Keyword/metadata not the category titles. Sorry for any confusion.

Cheers,
Ian & Stu

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

  • Posts: 81504
  • Thank you received: 13064
  • MODERATOR
6 years 10 months ago #272181

Hi,

We've had people creating an A-Z index so that you can click on the letter to display only the products starting with that letter.
What you need is to create a custom field of the table "product" via the menu Display>Custom fields and of the type single dropdown and with the 26 letters as values.
Then, in each product select the value in the custom field.
And finally, you can create a filter of the type "list" on that custom field via the menu Display>Filters so that it will display on the top of the products listings.

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

  • Posts: 173
  • Thank you received: 14
  • Hikashop Business
6 years 10 months ago #272196

Fantastic. Exactly what I wanted. Thanks,
Ian and Stu

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

  • Posts: 173
  • Thank you received: 14
  • Hikashop Business
6 years 10 months ago #272197

Also, because we have such a large catatogue, would it be possible to use a mass action to grab the product name's first letter and copy it to the new field?

Regards,
Ian and Stu

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

  • Posts: 81504
  • Thank you received: 13064
  • MODERATOR
6 years 10 months ago #272213

Hi,

It's not possible with the mass action system. But you can create a MySQL query and run it on your database in order to do that.
It's quite easy:

UPDATE #__hikashop_product SET XXX=LOWER(LEFT(product_name,1));
You need to replace #__ by the table prefix on your website, XXX by the column name of your custom field.
Also, you need the values of your custom field to be lower case. If you want upper case, that's possible and you need to change LOWER by UPPER in the query.

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

  • Posts: 173
  • Thank you received: 14
  • Hikashop Business
6 years 10 months ago #272255

Thanks. I'll test it out with the db. I was think of mass actions because it could be save and run by non technical admin users or based on triggers that they can understand.

Much appreciated,
Ian and Stu

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

  • Posts: 173
  • Thank you received: 14
  • Hikashop Business
6 years 9 months ago #272551

Hi,
the mass action worked. I did one for each letter which were identical. Grabbing the first letter in one hit would have been neater but I decided not mess with the db.

Just wanted to let you know,
Ian &Stu

The following user(s) said Thank You: nicolas

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

  • Posts: 10
  • Thank you received: 0
4 years 4 months ago #313581

Hi,

Is there any way to do the same logic with categories (not products)? I need to create A-Z index filter for categories listing.
Managed to create category table with first letter category name values, but cant apply filter to this view. This available only for products custom views tables.
Thank you in advance.

Regards,
Arunas

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

  • Posts: 173
  • Thank you received: 14
  • Hikashop Business
4 years 4 months ago #313594

We haven't used this in a while but you need to;
1. Create the custom view and field (as you have done) for the letter
2. Populate the categories or products with their Alpha code
3. Create a custom filter for use on the front end
4. I can't remember if a module needs to be activated thereafter or if this happens automatically

We decided that our catalogue was too big for this to be of any use and went with category based menu systems and predictive text searching.

Regards,
Ian and Stu

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

  • Posts: 10
  • Thank you received: 0
4 years 4 months ago #313601

I can do it easily with product filtering (when creating product custom table and filter applying to products listing).
But when I create category custom view, I can't apply this on filter - only products table custom views available.

With product custom table of course filter not working - tried hoping that it will work somehow :) Is there any other way to create A-Z index for categories listing?

Thanks,
Arunas

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

  • Posts: 81504
  • Thank you received: 13064
  • MODERATOR
4 years 4 months ago #313583

Hi,

There is no filter feature for categories listings, only for products listings.

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

  • Posts: 173
  • Thank you received: 14
  • Hikashop Business
4 years 4 months ago #313621

Hi,
you can use the menu system to create and A-Z manually. It's better to just use the top level categories but you can include lower level sub-categories starting with the same letter. In this example I've included both 'B > BABY' AND 'B > BOTTLE' but you can make it as complex as you like.
bmcpharm.com.au/a-z-index.html

If you categories don't change that much, it's a good option. If you come up with something slicker let me know.

Cheers,
Ian and Stu

The following user(s) said Thank You: nicolas

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

Time to create page: 0.089 seconds
Powered by Kunena Forum