Creating override

  • Posts: 26
  • Thank you received: 2
  • Hikashop Business
5 months 1 week ago #356851

-- url of the page with the problem -- : demoisellegol.fr/fr/bouquets/product/homa
-- HikaShop version -- : 5.0.0
-- Joomla version -- : 5.0.0
-- PHP version -- : 8.1

Hi
can you please me how i can i create an override to add custom classes to hikashop dropdowns
i tried by following documentations but did not managed to

Attachments:

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

  • Posts: 81597
  • Thank you received: 13079
  • MODERATOR
5 months 1 week ago #356853

Hi,

These dropdowns are options. They are displayed by the product / option view file so you can edit it via the menu Display>Views in order to modify the code displaying the dropdowns. You can find by yourself if you follow this documentation:
www.hikashop.com/support/documentation/1...-display.html#layout

There, you'll find this line of code:

$attribs.=' class="'.HK_FORM_SELECT_CLASS.'" ';
That's where the class of the dropdown is set. So you can change this line to add your own (your template I suppose) classes.

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

  • Posts: 26
  • Thank you received: 2
  • Hikashop Business
5 months 1 week ago #356879

thank you

that dropdowns are now fixed

would you please tell me how can i create override to add classes to these fields too :



these are order custom fields

i want too add classes in override so that i won't lose the classes after update

Attachments:

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

  • Posts: 81597
  • Thank you received: 13079
  • MODERATOR
5 months 1 week ago #356882

Hi,

Custom order fields are displayed by the view file checkout / show_block_fields
In there, you have the line:

' class="'.HK_FORM_CONTROL_CLASS.'" '.$onWhat.'="window.hikashop.toggleField(this,\''.$fieldName.'\',\'order_' . $this->step . '_' . $this->module_position.'\',0,\'hikashop_\');"',

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

Time to create page: 0.072 seconds
Powered by Kunena Forum