Hot To Set Default Billing/Shipping Selected State

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
dave@givemore.com
Ensign (ENS)
Ensign (ENS)
Posts: 20
Joined: Tue Jan 13, 2009 11:11 am

Hot To Set Default Billing/Shipping Selected State

Post by dave@givemore.com » Fri Mar 05, 2010 4:00 pm

Does anyone know how to set the default billing/shipping state that is selected during checkout.

We are pulling the states from a database table, and the default is currently the first alphabetical state, which is Alabama.

I would like it to be set to a double dash "--" or something similar as the default to ensure my customers do not select an incorrect state.

There should also be validation in place to make sure "--" isn't still selected, which may or may not be handled by the current validation.

Thanks!
Joe
Give More Media
http://www.givemore.com/

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Hot To Set Default Billing/Shipping Selected State

Post by mazhar » Sat Mar 06, 2010 10:01 am

Have a look at this thread. Something similar is done here for shipping methods. I guess it would help you viewtopic.php?f=42&t=10264

dave@givemore.com
Ensign (ENS)
Ensign (ENS)
Posts: 20
Joined: Tue Jan 13, 2009 11:11 am

Re: Hot To Set Default Billing/Shipping Selected State

Post by dave@givemore.com » Tue Mar 09, 2010 9:51 am

Mazhar,

We do not use onepagecheckout.ascx.

I tried to utilize the code on the thread you mentioned above, but did not have any luck.

Below if what we are using to pull the state drop down. Do you have any other ideas, or suggestions?

Code: Select all

<asp:Label ID="BillToProvinceLabel" runat="server" Text="State:<span class='red'>*</span>" AssociatedControlID="BillToProvince" EnableViewState="false" CssClass="shippinglabels" />
<asp:TextBox ID="BillToProvince" runat="server" Visible="false" EnableViewState="false" MaxLength="50" CssClass="shippingfields" /><!-- <br /> --><!-- AP-CAPTECH -->
<asp:DropDownList ID="BillToProvinceList" runat="server" EnableViewState="false" CssClass="shippingstate"></asp:DropDownList>

Thanks!
Give More Media
http://www.givemore.com/

Post Reply