custom javascript in billing/shipping address

  • Posts: 26
  • Thank you received: 0
8 years 6 months ago #238939

-- HikaShop version -- : 2.6.2
-- Joomla version -- : 3.4.8

Hi ,
I would like to implement special behavior in the address fields,
I want to auto-fill the state and country depending on the zip code, I have worked the javascript code out, and tested it in a simple html page, but I can't get it to run inside hikashop checkout .
what is the exact view file to update? either I can't find it , or it's being added but not running properly,
should I add the script tag ? or use the php addScriptDeclaration function, to insert javascript as string?

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

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
8 years 6 months ago #238941

Hi,

The custom address fields are displayed in several places:
- the file "custom_fields" of the view "user"
- the file "form" of the view "address"
- the file "show" of the view "address"
So you potentially need to add your javascript code in all the three view files via the menu Display>Views.
You can either add a script tag or use the Joomla function to do it. I would recommend to use a script tag.

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

  • Posts: 26
  • Thank you received: 0
8 years 6 months ago #239041

Thanks, it worked fine indeed

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

Time to create page: 0.056 seconds
Powered by Kunena Forum