Another 7.0.2 Checkout Change - State/Province Textbox/List

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
derekz
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 38
Joined: Mon Nov 03, 2008 3:13 pm

Another 7.0.2 Checkout Change - State/Province Textbox/List

Post by derekz » Fri Mar 20, 2009 12:13 pm

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.

meer2005
Captain (CAPT)
Captain (CAPT)
Posts: 245
Joined: Wed Feb 09, 2005 2:00 pm

Re: Another 7.0.2 Checkout Change - State/Province Textbox/List

Post by meer2005 » Tue Mar 24, 2009 4:17 pm

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();

meer2005
Captain (CAPT)
Captain (CAPT)
Posts: 245
Joined: Wed Feb 09, 2005 2:00 pm

Re: Another 7.0.2 Checkout Change - State/Province Textbox/List

Post by meer2005 » Tue Mar 24, 2009 4:23 pm

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.

jdarby
Commander (CMDR)
Commander (CMDR)
Posts: 151
Joined: Thu Sep 25, 2008 2:21 pm

Re: Another 7.0.2 Checkout Change - State/Province Textbox/List

Post by jdarby » Thu May 21, 2009 10:01 am

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.

User avatar
mfreeze
Commodore (COMO)
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

Post by mfreeze » Thu May 28, 2009 2:03 pm

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

User avatar
Logan Rhodehamel
Developer
Developer
Posts: 4116
Joined: Wed Dec 10, 2003 5:26 pm

Re: Another 7.0.2 Checkout Change - State/Province Textbox/List

Post by Logan Rhodehamel » Thu May 28, 2009 2:12 pm

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:

Code: Select all

        if (provinces.Count > 0)
A quick test of this seems to work like you want.
Cheers,
Logan
Image.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.

User avatar
mfreeze
Commodore (COMO)
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

Post by mfreeze » Fri May 29, 2009 10:06 am

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();
Mary E Freeze

Freeze Frame Graphics
Web Hosting and Design, ASP and CFMX Development

http://www.ffgraphics.com

kastnerd
Commodore (COMO)
Commodore (COMO)
Posts: 474
Joined: Wed Oct 22, 2008 9:17 am

Re: Another 7.0.2 Checkout Change - State/Province Textbox/List

Post by kastnerd » Tue Jul 14, 2009 12:34 pm

will this code work for 7.0.3 as well?

User avatar
Logan Rhodehamel
Developer
Developer
Posts: 4116
Joined: Wed Dec 10, 2003 5:26 pm

Re: Another 7.0.2 Checkout Change - State/Province Textbox/List

Post by Logan Rhodehamel » Mon Jul 20, 2009 9:37 pm

It should. The line numbers referenced may be slightly different, but one page checkout has not changed significantly.
Cheers,
Logan
Image.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.

ZLA
Commodore (COMO)
Commodore (COMO)
Posts: 496
Joined: Fri Mar 13, 2009 2:55 pm

Re: Another 7.0.2 Checkout Change - State/Province Textbox/List

Post by ZLA » Wed Jul 22, 2009 10:11 am

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

Code: Select all

        if (provinces.Count > 0)
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.

KCarlson
Lieutenant (LT)
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

Post by KCarlson » Tue Jun 08, 2010 5:23 pm

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.

industry
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 37
Joined: Fri Apr 03, 2009 4:17 am

Re: Another 7.0.2 Checkout Change - State/Province Textbox/List

Post by industry » Fri Apr 01, 2011 5:15 am

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 :(

industry
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 37
Joined: Fri Apr 03, 2009 4:17 am

Re: Another 7.0.2 Checkout Change - State/Province Textbox/List

Post by industry » Wed Apr 06, 2011 2:05 am

Hi - i dont suppose anyone has a solution to the above, do they?

Thanks in advance

Post Reply