Skip to main content

Creating override

More
2 years 10 months ago #356851 by demoisellegol
-- 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

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

More
2 years 10 months ago #356853 by nicolas
Replied by nicolas on topic Creating override
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:
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.

More
2 years 10 months ago #356879 by demoisellegol
Replied by demoisellegol on topic Creating override
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

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

More
2 years 10 months ago #356882 by nicolas
Replied by nicolas on topic Creating override
Hi,

Custom order fields are displayed by the view file checkout / show_block_fields
In there, you have the line:
Code:
' 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.178 seconds
Powered by Kunena Forum