PlaceOrder2.aspx - set default country in dropdownlist
Posted: Wed Jul 29, 2009 9:04 am
How do you set the default country in the dropdown list when placing an order in the admin interface, PlaceOrder2.aspx
http://forums.ablecommerce.com/
Code: Select all
if (!Page.IsPostBack)
{
// INITIALIZE THE BILLING ADDRESS
if (_Basket.User != null && !_Basket.User.IsAnonymous)
{
BindBillingAddress();
BindShippingAddress();
}
else
{
CustomerLookupButton.Visible = true;
BillToCountryCode.SelectedValue = "GB";
}
UpdateShipMethod();
}
Code: Select all
// INITIALIZE THE BILLING ADDRESS
if (_Basket.User != null && !_Basket.User.IsAnonymous)
{
BindBillingAddress();
BindShippingAddress();
ListItem defaultCountry1 = BillToCountryCode.Items.FindByValue(Token.Instance.Store.DefaultWarehouse.Country.CountryCode);
defaultCountry1.Selected = true;
ListItem defaultCountry2 = ShipToCountryCode.Items.FindByValue(Token.Instance.Store.DefaultWarehouse.Country.CountryCode);
defaultCountry2.Selected = true;
}
else
{
CustomerLookupButton.Visible = true;
}
UpdateShipMethod();