active class no longer applied in HikaShop Content Module

  • Posts: 34
  • Thank you received: 6
  • Hikashop Business
1 month 5 days ago #366074

-- HikaShop version -- : 5.1.5
-- Joomla version -- : 5.2.4

Hi,
I've just realized that active items (main category + subcategory) are no longer attributed with "active" class.
Is it a new bug or something else has changed?

Thank you very much. Kind regards.

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

  • Posts: 83590
  • Thank you received: 13528
  • MODERATOR
1 month 3 days ago #366079

Hi,

This is still working fine for us on our end, and we didn't change anything for a while there so I'm not sure what it could be.
Could you provide a superadmin backend access in order to check things out via our contact form ?
www.hikashop.com/support/contact-us.html

The following user(s) said Thank You: bellaidea

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

  • Posts: 34
  • Thank you received: 6
  • Hikashop Business
1 month 1 day ago #366128

Hi Nicolas,
thank you for your reply.
I've just sent a message containing credentials.
Thank you!
Regards

nicolas wrote: Hi,

This is still working fine for us on our end, and we didn't change anything for a while there so I'm not sure what it could be.
Could you provide a superadmin backend access in order to check things out via our contact form ?
www.hikashop.com/support/contact-us.html

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

  • Posts: 83590
  • Thank you received: 13528
  • MODERATOR
1 month 1 day ago #366147

Hi,

Thanks for the access.
I found what the problem is.
I thought you were using the "list" layout as it is usually the case with listings of categories in sidebars.
But you're actually using the "div" layout. And in that mode, there is indeed a problem with the children.
There is actually already code to support this, but there is a piece of code missing for the children categories.
I've added a patch on our end and confirmed that it now works on your test website, with the access you provided.
To get the patch on other websites, download the latest version of HikaShop on our website, install it on yours and you'll get it.

Note that the classes are hikashop_current_parent_category ( for the main categories ), and hikashop_current_subcategory ( for the children categories ).

The following user(s) said Thank You: bellaidea

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

  • Posts: 34
  • Thank you received: 6
  • Hikashop Business
1 month 11 hours ago #366159

Hi Nicolas,
thank you for your support.
As far as I can see, active (or current) classes are missing for hikashop_category_name items too. They should be active when directly selecteded or when a child is selected.
Am I wrong?

Thank you very much!

nicolas wrote: Hi,

Thanks for the access.
I found what the problem is.
I thought you were using the "list" layout as it is usually the case with listings of categories in sidebars.
But you're actually using the "div" layout. And in that mode, there is indeed a problem with the children.
There is actually already code to support this, but there is a piece of code missing for the children categories.
I've added a patch on our end and confirmed that it now works on your test website, with the access you provided.
To get the patch on other websites, download the latest version of HikaShop on our website, install it on yours and you'll get it.

Note that the classes are hikashop_current_parent_category ( for the main categories ), and hikashop_current_subcategory ( for the children categories ).

Last edit: 1 month 9 hours ago by bellaidea.

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

  • Posts: 83590
  • Thank you received: 13528
  • MODERATOR
1 month 8 hours ago #366165

Hi,

I'm not sure what you mean.
If you're saying that the "active" and "current" classes are still missing, then yes, that's normal. As I said, the classes are hikashop_current_parent_category / hikashop_current_subcategory and not "active" / "current".
Or are you talking about something else ?

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

  • Posts: 34
  • Thank you received: 6
  • Hikashop Business
4 weeks 2 days ago #366194

Sorry, I explained myself badly.
In my previous message "active" and "current" were adjectives, not classes names. :)
I meant that there is no distinction between a selected parent category and an unselected one, whatever the class to distinguish them. The class is always just "hikashop_category_name" (please find attached pics).
The distinction is only between selected children categories and an unselected ones.

nicolas wrote: Hi,

I'm not sure what you mean.
If you're saying that the "active" and "current" classes are still missing, then yes, that's normal. As I said, the classes are hikashop_current_parent_category / hikashop_current_subcategory and not "active" / "current".
Or are you talking about something else ?

Attachments:

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

  • Posts: 83590
  • Thank you received: 13528
  • MODERATOR
4 weeks 2 days ago #366196

Hi,

You need to look at the div around the whole category:
i.imgur.com/gXb3lLt.png
So, for example, if you want to change the span of the main category for the sub category currently selected, you can use:

.hikashop_current_parent_category .hikashop_category_name{ color: green; }

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

  • Posts: 34
  • Thank you received: 6
  • Hikashop Business
4 weeks 21 hours ago #366231

Hi Nicolas,
there's no div with hikashop_current_parent_category class in the page, event clicking on "Idee Regalo". Where did you get it from? :)

Please, delete the picture because it contains the url of my test server.
Thanks! ;)

nicolas wrote: Hi,

You need to look at the div around the whole category:
i.imgur.com/gXb3lLt.png
So, for example, if you want to change the span of the main category for the sub category currently selected, you can use:

.hikashop_current_parent_category .hikashop_category_name{ color: green; }

Attachments:
Last edit: 4 weeks 21 hours ago by bellaidea. Reason: Attached wrong image

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

  • Posts: 83590
  • Thank you received: 13528
  • MODERATOR
4 weeks 9 hours ago #366232

Hi,

Look in the screenshot I gave in my previous message. Just above the pointer of my mouse you can see the class hikashop_current_parent_category.
This is on the page of the "Biglietti d'auguri" sub category.
You can also see the class hikashop_current_subcategory on the li tag of the "Biglietti d'auguri" sub category in my screenshot.

If you want to delete the screenshot, you can click on the 3 dots on the page of the screenshot, just above the the top right corner of the image. And then select "request deletion".

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

  • Posts: 34
  • Thank you received: 6
  • Hikashop Business
3 weeks 5 days ago #366281

Hi again Nicolas,
yes, I know that hikashop_current_parent_category is present in YOUR screenshot but I cannot find it in MY screenshots and in the test site I've set up for you.
That's why I asked you hou did you get that screenshot. Why my results are different?
Thanks!

nicolas wrote: Hi,

Look in the screenshot I gave in my previous message. Just above the pointer of my mouse you can see the class hikashop_current_parent_category.
This is on the page of the "Biglietti d'auguri" sub category.
You can also see the class hikashop_current_subcategory on the li tag of the "Biglietti d'auguri" sub category in my screenshot.

If you want to delete the screenshot, you can click on the 3 dots on the page of the screenshot, just above the the top right corner of the image. And then select "request deletion".

Last edit: 3 weeks 5 days ago by bellaidea.

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

  • Posts: 83590
  • Thank you received: 13528
  • MODERATOR
3 weeks 4 days ago #366282

Hi,

I don't know why your results are different.
As I said, I just looked at your test website in the "Biglietti d'auguri" sub category.
Here is a new screenshot where you can also see the URL of the page where I am: i.imgur.com/f5DJOXU.png
I don't understand why you would not have the classes on that same URL. Please double check.

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

  • Posts: 34
  • Thank you received: 6
  • Hikashop Business
3 weeks 4 days ago #366286

Ok, I've realized that you are in the wrong category.
I was referring to MAIN categories (Idee regalo, Complementi d'arredo, etc...). :)

nicolas wrote: Hi,

I don't know why your results are different.
As I said, I just looked at your test website in the "Biglietti d'auguri" sub category.
Here is a new screenshot where you can also see the URL of the page where I am: i.imgur.com/f5DJOXU.png
I don't understand why you would not have the classes on that same URL. Please double check.

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

  • Posts: 83590
  • Thank you received: 13528
  • MODERATOR
3 weeks 4 days ago #366291

Hi,

Ah ok. Indeed, we were not talking about the same thing then.
I thought you were talking about the class of the main category while looking at the sub category page.
I see the problem now. I've made another patch to add the hikashop_current_category class when a main category is selected.

The following user(s) said Thank You: bellaidea

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

  • Posts: 34
  • Thank you received: 6
  • Hikashop Business
3 weeks 4 days ago #366299

nicolas wrote: Ah ok. Indeed, we were not talking about the same thing then.


;)

nicolas wrote: I thought you were talking about the class of the main category while looking at the sub category page.


Also. Main category should be enhanced both when directly selected or when one of its subcategories are selected, I think.

nicolas wrote: I see the problem now. I've made another patch to add the hikashop_current_category class when a main category is selected.


Do I have to download the package again or are you going to create a new release?

Thank you very much!
Kind regards

Last edit: 3 weeks 4 days ago by bellaidea.

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

  • Posts: 83590
  • Thank you received: 13528
  • MODERATOR
3 weeks 3 days ago #366300

Hi,

You have to download the package again and install it on your website to get the patch.

What do you mean by "Main category should be enhanced both when directly selected or when one of its subcategories are selected, I think" ?

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

  • Posts: 34
  • Thank you received: 6
  • Hikashop Business
3 weeks 3 days ago #366303

Hi,
I'll download the package again, thanks.

I mean that if I select a subcategory, its parent should be "classed" as selected too because, if the subcategory is hidden (in an accordion, for example), the user knows that the current displayed page's menu is in its main category's branch. Please, find attached example.


nicolas wrote: Hi,

You have to download the package again and install it on your website to get the patch.

What do you mean by "Main category should be enhanced both when directly selected or when one of its subcategories are selected, I think" ?

Attachments:
Last edit: 3 weeks 3 days ago by bellaidea.

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

  • Posts: 83590
  • Thank you received: 13528
  • MODERATOR
3 weeks 3 days ago #366306

Hi,

I'm not following you. Isn't that already the case ?
As I said in a previous message, you can use such CSS code to customize the parent category name when a sub category is selected:

.hikashop_current_parent_category .hikashop_category_name{ color: green; }

The following user(s) said Thank You: bellaidea

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

  • Posts: 34
  • Thank you received: 6
  • Hikashop Business
3 weeks 2 days ago #366320

Hi!
Yes, you are right. Sorry, my mistake. :)

Thank you!

nicolas wrote: Hi,

I'm not following you. Isn't that already the case ?
As I said in a previous message, you can use such CSS code to customize the parent category name when a sub category is selected:

.hikashop_current_parent_category .hikashop_category_name{ color: green; }

The following user(s) said Thank You: nicolas

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

Time to create page: 0.091 seconds
Powered by Kunena Forum