How to apply a custom container CSS class for one of the categories

  • Posts: 41
  • Thank you received: 9
4 years 3 months ago #326992

-- HikaShop version -- : 4.4.0
-- Joomla version -- : 3.9.23
-- PHP version -- : 7.4

Hello!

In the latest Hikashop-based e-store that I'm currently working on there are multiple categories nested inside each other (meaning - customer must select a brand, then a model, then a part type, and only then a product list appears). A challange that I'm now facing is that customer wants to have a slightly different layout for the model selection step (one of the categories).

I somehow assumed that it should be a piece of cake, given how flexible Hikashop platform is, and I included such design in my proposal, but now, actually setting this store up, I was bit surprised that there is no option for setting a custom class name for a particular category. :unsure:

Before I'm forced to write some kind of JavaScript based hack (something terrible like: "if category_title = "select model" then add class "model_selection_step" ), maybe there is some more elegant solution to this issue I'm facing? Many thanks in advance!

Best regards.

Last edit: 4 years 3 months ago by Savickis.

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

  • Posts: 83404
  • Thank you received: 13498
  • MODERATOR
4 years 3 months ago #327017

Hi,

While you can't set your own custom class, the listings all have a class which is dynamic with the menu item id and another dynamic with the id of the category.
So you should not need custom javascript code for that if you use the correct class / css.
Now without looking at the page and the modification you're trying to make I can't say what would be the exact CSS.

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

  • Posts: 41
  • Thank you received: 9
4 years 2 months ago #327620

Oh, thank you - I had totally missed this feature. I will simply add custom css for .hikashop_category_information_menu_XXX depending in which categories I need some design adjustments. Thanks!

Last edit: 4 years 2 months ago by Savickis.

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

Time to create page: 0.041 seconds
Powered by Kunena Forum