Page 1 of 1
Another 7.0.2 Checkout Change - State/Province Textbox/List
Posted: Fri Mar 20, 2009 12:13 pm
by derekz
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
Posted: Tue Mar 24, 2009 4:17 pm
by meer2005
I had to change this on the onepagecheckout.ascx.cs :
Code: Select all
private bool _ShowBillToProvinceList = false;
to this:
Code: Select all
private bool _ShowBillToProvinceList = true;
and this:
Code: Select all
ProvinceText.Visible = true;
ProvinceList.Visible = false;
ProvinceList.Items.Clear();
to this:
Code: Select all
ProvinceText.Visible = false;
ProvinceList.Visible = true;
ProvinceList.Items.Clear();
Re: Another 7.0.2 Checkout Change - State/Province Textbox/List
Posted: Tue Mar 24, 2009 4:23 pm
by meer2005
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
Posted: Thu May 21, 2009 10:01 am
by jdarby
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.
Re: Another 7.0.2 Checkout Change - State/Province Textbox/List
Posted: Thu May 28, 2009 2:03 pm
by mfreeze
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?
Re: Another 7.0.2 Checkout Change - State/Province Textbox/List
Posted: Thu May 28, 2009 2:12 pm
by Logan Rhodehamel
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?
In ConLib\OnePageCheckout.ascx.cs, around line 869 there is this code:
Code: Select all
if (provinces.Count > 0 && (countryChanged || provinceError || showProvinces))
I think you could just change it to this:
A quick test of this seems to work like you want.
Re: Another 7.0.2 Checkout Change - State/Province Textbox/List
Posted: Fri May 29, 2009 10:06 am
by mfreeze
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();
Re: Another 7.0.2 Checkout Change - State/Province Textbox/List
Posted: Tue Jul 14, 2009 12:34 pm
by kastnerd
will this code work for 7.0.3 as well?
Re: Another 7.0.2 Checkout Change - State/Province Textbox/List
Posted: Mon Jul 20, 2009 9:37 pm
by Logan Rhodehamel
It should. The line numbers referenced may be slightly different, but one page checkout has not changed significantly.
Re: Another 7.0.2 Checkout Change - State/Province Textbox/List
Posted: Wed Jul 22, 2009 10:11 am
by ZLA
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
Code: Select all
if (Page.IsPostBack && provinces.Count > 0)
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.
Re: Another 7.0.2 Checkout Change - State/Province Textbox/List
Posted: Tue Jun 08, 2010 5:23 pm
by KCarlson
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.
Re: Another 7.0.2 Checkout Change - State/Province Textbox/List
Posted: Fri Apr 01, 2011 5:15 am
by industry
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

Re: Another 7.0.2 Checkout Change - State/Province Textbox/List
Posted: Wed Apr 06, 2011 2:05 am
by industry
Hi - i dont suppose anyone has a solution to the above, do they?
Thanks in advance