Another 7.0.2 Checkout Change - State/Province Textbox/List
Another 7.0.2 Checkout Change - State/Province Textbox/List
I noticed that 7.0.2 defaults to a Textbox for the State/Province in the OnePageCheckout. It only shows the drop down if you have a problem with the state. Is there anyway to only show the dropdown.
Re: Another 7.0.2 Checkout Change - State/Province Textbox/List
I had to change this on the onepagecheckout.ascx.cs :
to this:
and this:
to this:
Code: Select all
private bool _ShowBillToProvinceList = false;
Code: Select all
private bool _ShowBillToProvinceList = true;
Code: Select all
ProvinceText.Visible = true;
ProvinceList.Visible = false;
ProvinceList.Items.Clear();
Code: Select all
ProvinceText.Visible = false;
ProvinceList.Visible = true;
ProvinceList.Items.Clear();
Re: Another 7.0.2 Checkout Change - State/Province Textbox/List
nevermind... that works for the USA and some countries, but that leaves a blank dropdown box for most foreign countries that don't have a province list. How do we use the dropdown for the states/province in ac 7.0.2????? I need it to default to the dropdown, and display a text box if there isn't a dropdown list available.
Re: Another 7.0.2 Checkout Change - State/Province Textbox/List
any update on this? i would think that the checkout state/province field would be a dropdown instead of an open text field. The shipping calculator's state/province list is a dropdown. i found it odd that the two conflicted.
- mfreeze
- Commodore (COMO)
- Posts: 421
- Joined: Mon Jan 24, 2005 2:07 pm
- Location: Washington, NJ
- Contact:
Re: Another 7.0.2 Checkout Change - State/Province Textbox/List
I also have several clients that are expressing dissatisfaction with the change from a dropdown list to a text box. Has anybody come up with a solution that checks for the existence of a province list before building the dropdown?
Mary E Freeze
Freeze Frame Graphics
Web Hosting and Design, ASP and CFMX Development
http://www.ffgraphics.com
Freeze Frame Graphics
Web Hosting and Design, ASP and CFMX Development
http://www.ffgraphics.com
- Logan Rhodehamel
- Developer
- Posts: 4116
- Joined: Wed Dec 10, 2003 5:26 pm
Re: Another 7.0.2 Checkout Change - State/Province Textbox/List
In ConLib\OnePageCheckout.ascx.cs, around line 869 there is this code:mfreeze wrote:I also have several clients that are expressing dissatisfaction with the change from a dropdown list to a text box. Has anybody come up with a solution that checks for the existence of a province list before building the dropdown?
Code: Select all
if (provinces.Count > 0 && (countryChanged || provinceError || showProvinces))
Code: Select all
if (provinces.Count > 0)
Cheers,
Logan
.com
If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.
Logan

If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.
- mfreeze
- Commodore (COMO)
- Posts: 421
- Joined: Mon Jan 24, 2005 2:07 pm
- Location: Washington, NJ
- Contact:
Re: Another 7.0.2 Checkout Change - State/Province Textbox/List
Logan,
Thanks for the hint. I had to make one other change. In the else for that if around line 909, I had to change
ProvinceText.Visible = false;
ProvinceList.Visible = true;
ProvinceList.Items.Clear();
to
ProvinceText.Visible = true;
ProvinceList.Visible = false;
ProvinceList.Items.Clear();
Thanks for the hint. I had to make one other change. In the else for that if around line 909, I had to change
ProvinceText.Visible = false;
ProvinceList.Visible = true;
ProvinceList.Items.Clear();
to
ProvinceText.Visible = true;
ProvinceList.Visible = false;
ProvinceList.Items.Clear();
Mary E Freeze
Freeze Frame Graphics
Web Hosting and Design, ASP and CFMX Development
http://www.ffgraphics.com
Freeze Frame Graphics
Web Hosting and Design, ASP and CFMX Development
http://www.ffgraphics.com
Re: Another 7.0.2 Checkout Change - State/Province Textbox/List
will this code work for 7.0.3 as well?
- Logan Rhodehamel
- Developer
- Posts: 4116
- Joined: Wed Dec 10, 2003 5:26 pm
Re: Another 7.0.2 Checkout Change - State/Province Textbox/List
It should. The line numbers referenced may be slightly different, but one page checkout has not changed significantly.
Cheers,
Logan
.com
If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.
Logan

If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.
Re: Another 7.0.2 Checkout Change - State/Province Textbox/List
Has anyone applied this change to the multi page checkout process when there are multiple destinations? It looks like it's similar. For example, for EditBillingAddress, I think you just have to change
to
and apply mfreeze's change:
ProvinceText.Visible = false;
ProvinceList.Visible = true;
ProvinceList.Items.Clear();
to
ProvinceText.Visible = true;
ProvinceList.Visible = false;
ProvinceList.Items.Clear();
Does that sound correct? I assume this applies to EditBillingAddressPage, EditShippingAddressPage and also EditMyAddressPage.
Code: Select all
if (Page.IsPostBack && provinces.Count > 0)
Code: Select all
if (provinces.Count > 0)
ProvinceText.Visible = false;
ProvinceList.Visible = true;
ProvinceList.Items.Clear();
to
ProvinceText.Visible = true;
ProvinceList.Visible = false;
ProvinceList.Items.Clear();
Does that sound correct? I assume this applies to EditBillingAddressPage, EditShippingAddressPage and also EditMyAddressPage.
-
- Lieutenant (LT)
- Posts: 71
- Joined: Mon Dec 13, 2004 5:35 pm
- Location: Santa Barbara, CA
- Contact:
Re: Another 7.0.2 Checkout Change - State/Province Textbox/List
I was just looking at this for 7.0.4 and it looks like the logic is exactly reversed for when the province count is positive and when it is 0. Also, just below that code whether the billing and shipping province is required is set, but it looks like it is set here -
BillToProvinceRequired.Enabled = BillToProvinceList.Visible;
ShipToProvinceRequired.Enabled = ShipToProvinceList.Visible;
but these don't ever seem to be set. So it seems like it should be -
BillToProvinceRequired.Enabled = ProvinceList.Visible;
ShipToProvinceRequired.Enabled = ProvinceList.Visible;
since those are set just above that code.
I have made that change and now my international customers can checkout without being blocked if they don't have a province.
BillToProvinceRequired.Enabled = BillToProvinceList.Visible;
ShipToProvinceRequired.Enabled = ShipToProvinceList.Visible;
but these don't ever seem to be set. So it seems like it should be -
BillToProvinceRequired.Enabled = ProvinceList.Visible;
ShipToProvinceRequired.Enabled = ProvinceList.Visible;
since those are set just above that code.
I have made that change and now my international customers can checkout without being blocked if they don't have a province.
Re: Another 7.0.2 Checkout Change - State/Province Textbox/List
Can someone please try and help me, with the same problem (which the fixes listed don't seem to fix)
https://www.geniusnet.co.uk/
If you just add any item to your basket and then checkout - you go to fill out the fields and the dropdown for state/province is blank and i can't seem to get it to populate
Please help as nobody can continue and buy anything
https://www.geniusnet.co.uk/
If you just add any item to your basket and then checkout - you go to fill out the fields and the dropdown for state/province is blank and i can't seem to get it to populate
Please help as nobody can continue and buy anything

Re: Another 7.0.2 Checkout Change - State/Province Textbox/List
Hi - i dont suppose anyone has a solution to the above, do they?
Thanks in advance
Thanks in advance