I can a customer profile from the order screen, except when a customer creates an account after placing an order as an anonymous user. Then when I go to the original order and click on customer profile I get the following error;
Server Error in '/' Application.
Object reference not set to an instance of an object.
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.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 22: CountryCode.DataBind();
Line 23: //INIT ADDRESS
Line 24: Address address = _User.PrimaryAddress;
Line 25: FirstName.Text = address.FirstName;
Line 26: LastName.Text = address.LastName;
Source File: d:\Domains\samssteins.com\wwwroot\Admin\People\Users\AddressBook.ascx.cs Line: 24
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
Admin_People_Users_AddressBook.Page_Init(Object sender, EventArgs e) in d:\Domains\samssteins.com\wwwroot\Admin\People\Users\AddressBook.ascx.cs:24
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnInit(EventArgs e) +99
System.Web.UI.UserControl.OnInit(EventArgs e) +77
System.Web.UI.Control.InitRecursive(Control namingContainer) +333
System.Web.UI.Control.InitRecursive(Control namingContainer) +210
System.Web.UI.Control.InitRecursive(Control namingContainer) +210
System.Web.UI.Control.InitRecursive(Control namingContainer) +210
System.Web.UI.Control.InitRecursive(Control namingContainer) +210
System.Web.UI.Control.InitRecursive(Control namingContainer) +210
System.Web.UI.Control.InitRecursive(Control namingContainer) +210
System.Web.UI.Control.InitRecursive(Control namingContainer) +210
System.Web.UI.Control.InitRecursive(Control namingContainer) +210
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +378
Version Information: Microsoft .NET Framework Version:2.0.50727.3615; ASP.NET Version:2.0.50727.3618
View Customer Profile Error from Order screen
-
- Lieutenant Commander (LCDR)
- Posts: 92
- Joined: Thu Jul 10, 2008 11:43 am
- Location: Lancaster PA
- Contact:
Re: View Customer Profile Error from Order screen
Have you customized some thing?
hope this helps!
__________________
s_ismail
AbleCommerce Customization
Free Plugins and Add-Ons
AbleCommerce Plugins and Add-Ons
Plugables Blog
__________________
s_ismail
AbleCommerce Customization
Free Plugins and Add-Ons
AbleCommerce Plugins and Add-Ons
Plugables Blog
-
- Lieutenant Commander (LCDR)
- Posts: 92
- Joined: Thu Jul 10, 2008 11:43 am
- Location: Lancaster PA
- Contact:
Re: View Customer Profile Error from Order screen
No, I have not customized anything.
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
Re: View Customer Profile Error from Order screen
I have had that happen occasionally and haven't completely tracked it down, but I think it might be because of store maintenance deleting anonymous users.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Re: View Customer Profile Error from Order screen
Yes, it's because the anonymous user was deleted. You can see that when you hover on the Profile button that the URL at the botton of the page shows UserId=0. I added a conditional statement in ~/Admin/Orders/OrderMenu.cs
Code: Select all
protected void Page_Load(object sender, EventArgs e)
{
InitOrder();
if (_Order != null)
{
string suffix = "?OrderNumber=" + _Order.OrderNumber.ToString() + "&OrderId=" + _OrderId.ToString();
Summary.NavigateUrl += suffix;
Payments.NavigateUrl += suffix;
Shipments.NavigateUrl += suffix;
History.NavigateUrl += suffix;
DigitalGoods.NavigateUrl += suffix;
GiftCertificates.NavigateUrl += suffix;
Subscriptions.NavigateUrl += suffix;
EditAddresses.NavigateUrl += suffix;
EditOrderItems.NavigateUrl += suffix;
string packslipUrl = Page.ResolveUrl("PackingList.aspx");
//Triple W - no error for anonymous users
if (_Order.UserId != 0)
Customer.NavigateUrl += "?UserId=" + _Order.UserId.ToString();
else
{
Customer.NavigateUrl = "";
Customer.Text = "Anonymous User";
}
// End
string fileName = Request.Url.Segments[Request.Url.Segments.Length - 1].ToLowerInvariant();
switch (fileName)
{
case "addpayment.aspx":
case "editpayment.aspx":
case "capturepayment.aspx":
case "voidpayment.aspx":
case "refundpayment.aspx":
Payments.CssClass = "contextMenuButtonSelected";
......................