Cart dromdown override

  • Posts: 48
  • Thank you received: 3
  • Hikashop Business
2 months 2 weeks ago #362620

-- url of the page with the problem -- : demoisellegol.fr/fr/cart
-- HikaShop version -- : 5.1.0
-- Joomla version -- : 5.1.2
-- PHP version -- : 8.1

hi
how can i add a class name to this dropdown via overrides ?
i'm using UIKit framework and i need this dropdown to have "uk-select" class

Attachments:

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

  • Posts: 82681
  • Thank you received: 13331
  • MODERATOR
2 months 2 weeks ago #362627

Hi,

In order to find which view file displays it, you could activate the "display view files" setting of the HikaShop configuration.
You'll see that it should be the layouts / quantity.php view file.
So you can edit it for your frontend template via the menu Display>Views.
There, I think you can just change the line:
$extra_classes = '';
to:
$extra_classes = 'uk-select';

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

  • Posts: 48
  • Thank you received: 3
  • Hikashop Business
2 months 2 weeks ago #362631

i enabeld that option
when I hover on every element i can see the view file exepct that dropdown !!\
I also added the desired class to $extra_classes in layouts/quantity.php but it did not worked

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

  • Posts: 4713
  • Thank you received: 638
  • MODERATOR
2 months 2 weeks ago #362633

Hello,

I'm really sorry, but if this doesn't work then there is probably an error in your php/html code.
From there, I can only invite you to double-check your code, also remember that you can also do reviews via AI applications like ChatGPT by example.
Regards

Last edit: 2 months 2 weeks ago by Philip.

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

  • Posts: 48
  • Thank you received: 3
  • Hikashop Business
2 months 2 weeks ago #362653

i exactly know where in the files of the main component (not view files) can add a class to this select field .. I only dont know how to create that override !

components/com_hikashop/views/layouts/tmpl/quantity.php
line 141

but the override of this file doesnt work

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

  • Posts: 4713
  • Thank you received: 638
  • MODERATOR
2 months 2 weeks ago #362657

Hello,

In details, follow me step by step :
1. in your layouts/quantity, go around line 145
2. AFTER "<div id="<?php echo $id; ?>_area" class="hikashop_product_quantity_div hikashop_product_quantity_input_div_select"><?php" (line 143 in my screenshot)
add this code : "$extra_classes .= "uk-select";"
To get this :



Hope this will help you

Last edit: 2 months 2 weeks ago by Philip.

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

Time to create page: 0.068 seconds
Powered by Kunena Forum