Override inputbox code in hickashopText::display()

  • Posts: 3
  • Thank you received: 0
10 years 6 months ago #154648

-- HikaShop version -- : 2.3.0

Hi,

I want to write my one HTML code for the inputBox.

how I could override the code of the hickashopText::display() function without writing in the core ?

I first though I could do like the doc says for the hikashop_quantity_render function, but there is no override on this.

Regards,

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

  • Posts: 12953
  • Thank you received: 1778
10 years 6 months ago #154660

Hello,
Can yo give me more information about what you really want to do through some screenshots ? It will help me to understand you issue.
Thanks.

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

  • Posts: 3
  • Thank you received: 0
10 years 6 months ago #154787

I have not any screen for this, but I just want to modify the input box html from that :

<input class="inputbox" id="address_post_code" onchange="hikashopToggleFields(this.value,'address_post_code','address',0);" type="text" name="data[address][address_post_code]" value="">

to that :
<input class="b-form__input--small" id="address_post_code" onchange="hikashopToggleFields(this.value,'address_post_code','address',0);" type="text" name="data[address][address_post_code]" value="" placeholder="Code postal *">

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
10 years 6 months ago #154802

Hi,

A simple solution is to edit the file "custom_fields"/"custom_fields_bootstrap" files of the view "user" via the menu Display>Views and add a str_replace to the HTML returned by the display function call there.

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

  • Posts: 3
  • Thank you received: 0
10 years 6 months ago #155715

Sorry for my late return.

Simple solution indeed. I will apply that.

But I am not totally fond of this kind of tweek. Would not be more elegant to put the html in a template folder and inject some vars in it ? I already seen that in some hickashop part but it is not generalized. I think it would be a great feature which could save hours of searching :)

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

  • Posts: 13201
  • Thank you received: 2322
10 years 6 months ago #155723

Hi,

Using the method given by Nicolas by using our view override thanks to the menu Display > Views is elegant ;)
It create a view override in the template automatically.

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

Time to create page: 0.087 seconds
Powered by Kunena Forum