- Posts: 26
- Thank you received: 0
custom javascript in billing/shipping address
- issa.mouawad
-
Topic Author
- Offline
Less
More
10 years 4 months ago #238939
by issa.mouawad
custom javascript in billing/shipping address was created by issa.mouawad
-- 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?
-- 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.
10 years 4 months ago #238941
by nicolas
Replied by nicolas on topic custom javascript in billing/shipping address
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.
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.
- issa.mouawad
-
Topic Author
- Offline
Less
More
- Posts: 26
- Thank you received: 0
10 years 4 months ago #239041
by issa.mouawad
Replied by issa.mouawad on topic custom javascript in billing/shipping address
Thanks, it worked fine indeed
Please Log in or Create an account to join the conversation.
Time to create page: 0.175 seconds