We installed the 7.0.2 upgade build 11659 this weekend and most everthing went fine. But this morning we ran into a problem try to place an order. This order happen to be an international order although I am not sure that is the root of the problem.
When clicking on the "Place Order" button the following error was displayed on the page https://store.weighdown.com/Admin/Order ... etId=11994
It appears that this error is happening in the BindBillingAddress function - to get around the error I changed the following line of code in that function:
if (selectedCountry != null) selectedCountry.Selected = true;
To the following:
if (selectedCountry != null)
{
BillToCountryCode.ClearSelection();
selectedCountry.Selected = true;
}
This change allowed that page to work and the order processed fine. Of course I would need someone to verify that this is not going to have any adverse effects and/or give me a better solution.
Here is the error message that was displayed:
Cannot have multiple items selected in a DropDownList.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: Cannot have multiple items selected in a DropDownList.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace: (just the first lines)
[HttpException (0x80004005): Cannot have multiple items selected in a DropDownList.]
System.Web.UI.WebControls.DropDownList.VerifyMultiSelect() +106
Error during checkout
Re: Error during checkout
I can reproduce the above issue by finding a user (on PlaceOrder2.aspx page) whose country is different then the default warehouse country.
Also the above suggested fix is VALID fix.
Also the above suggested fix is VALID fix.
Thanks for your support
Naveed Ashraf
.com
AbleCommerce Help Center
AbleCommerce Developer WIKI
Follow us on Twitter
Naveed Ashraf

AbleCommerce Help Center
AbleCommerce Developer WIKI
Follow us on Twitter
Re: Error during checkout
Another better fix is to use "SelectedIndex" property as under:
Find the following lines of code in ~/Admin/PlaceOrder2.aspx.cs (under BindBillingAddress() method)
------------------
ListItem selectedCountry = BillToCountryCode.Items.FindByValue(_Basket.User.PrimaryAddress.CountryCode.ToString());
if (selectedCountry != null) selectedCountry.Selected = true;
------------------
And change them to:
------------------
ListItem selectedCountry = BillToCountryCode.Items.FindByValue(_Basket.User.PrimaryAddress.CountryCode.ToString());
if (selectedCountry != null) BillToCountryCode.SelectedIndex = BillToCountryCode.Items.IndexOf(selectedCountry);
------------------
Find the following lines of code in ~/Admin/PlaceOrder2.aspx.cs (under BindBillingAddress() method)
------------------
ListItem selectedCountry = BillToCountryCode.Items.FindByValue(_Basket.User.PrimaryAddress.CountryCode.ToString());
if (selectedCountry != null) selectedCountry.Selected = true;
------------------
And change them to:
------------------
ListItem selectedCountry = BillToCountryCode.Items.FindByValue(_Basket.User.PrimaryAddress.CountryCode.ToString());
if (selectedCountry != null) BillToCountryCode.SelectedIndex = BillToCountryCode.Items.IndexOf(selectedCountry);
------------------
Thanks for your support
Naveed Ashraf
.com
AbleCommerce Help Center
AbleCommerce Developer WIKI
Follow us on Twitter
Naveed Ashraf

AbleCommerce Help Center
AbleCommerce Developer WIKI
Follow us on Twitter