- Posts: 12
- Thank you received: 0
3 character state
- petajc
- Topic Author
- Offline
- New Member
-
Less
More
12 years 9 months ago #27170
by petajc
3 character state was created by petajc
Hi Tuan
My client needs to display the 3 character state field - particularly on the emails sent to customers. I know there is such a field in the database - which files control what appears on the email?
Peta
My client needs to display the 3 character state field - particularly on the emails sent to customers. I know there is such a field in the database - which files control what appears on the email?
Peta
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
12 years 8 months ago #27197
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: 3 character state
Hi Peta
I think you can try to go to Events Booking->Configuration, find the config option Display state dropdown, set it to Yes. After that, when users register for the event, instead of entering state in a textbox, they will be able to choose their state (which is 3 characters) and it should solve the problem.
Please give it a try.
Tuan
I think you can try to go to Events Booking->Configuration, find the config option Display state dropdown, set it to Yes. After that, when users register for the event, instead of entering state in a textbox, they will be able to choose their state (which is 3 characters) and it should solve the problem.
Please give it a try.
Tuan
Please Log in or Create an account to join the conversation.
- petajc
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 12
- Thank you received: 0
12 years 8 months ago #27209
by petajc
Replied by petajc on topic Re: 3 character state
Hi Tuan
I am already using the state dropdown - the site is Australian.
The SELECT dropdown on the event form displays the states' full names eg New South Wales, Queensland etc which is fine, however the code it stores (ie the option value) with the booking is a two-character state code - I would like to store the three-character code so that when the confirming email is sent to the customer, it contains a three character state code instead of a two character state code.
The code for New South Wales is "NSW", so "NS" is fairly meaningless for an Australian.
Now I know there is a database table of states and it has populated fields for both 2char and 3char state codes. I would like to know where I can change the code for the SELECT dropdown so that it gets its option value from the 3char state field not the 2char state field.
Thank you
Peta
I am already using the state dropdown - the site is Australian.
The SELECT dropdown on the event form displays the states' full names eg New South Wales, Queensland etc which is fine, however the code it stores (ie the option value) with the booking is a two-character state code - I would like to store the three-character code so that when the confirming email is sent to the customer, it contains a three character state code instead of a two character state code.
The code for New South Wales is "NSW", so "NS" is fairly meaningless for an Australian.
Now I know there is a database table of states and it has populated fields for both 2char and 3char state codes. I would like to know where I can change the code for the SELECT dropdown so that it gets its option value from the 3char state field not the 2char state field.
Thank you
Peta
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
12 years 8 months ago #27310
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: 3 character state
Hi Peta
I think I understand your problem now. You can follow the instructions below to get it works as expected :
1. Open the file components/com_eventbooking/views/register/view.html.php
2. Find the code below (there are different lines of code like that)
3. Change state_2_code to state_3_code
After that, it will work as expected .
PS : I think you can simply open the file in a text editor, then find and replace state_2_code with state_3_code
Tuan
I think I understand your problem now. You can follow the instructions below to get it works as expected :
1. Open the file components/com_eventbooking/views/register/view.html.php
2. Find the code below (there are different lines of code like that)
Code:
SELECT state_2_code, state_name FROM #__eb_states
3. Change state_2_code to state_3_code
After that, it will work as expected .
PS : I think you can simply open the file in a text editor, then find and replace state_2_code with state_3_code
Tuan
The following user(s) said Thank You: Jono
Please Log in or Create an account to join the conversation.
- petajc
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 12
- Thank you received: 0
12 years 8 months ago #27322
by petajc
Replied by petajc on topic Re: 3 character state
Thank you Tuan, I'll try that !!
Peta
Peta
Please Log in or Create an account to join the conversation.
Moderators: Tuan Pham Ngoc
Support
Documentation
Information
Copyright © 2025 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.