Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 6 of 6

Thread: Anonymous can't edit address

  1. #1
    austin_e-store is offline Junior Member
    Join Date
    Feb 2007
    Posts
    7

    Default Anonymous can't edit address

    I've been running on ML for about 3 years and have recently upgraded to V9. I have a serious issue with the checkout process for anonymous/guest users. This is not a new issue for me, but I was hoping the upgrade to V9 would have resolved the problem. So far, it doesn't appear so.

    When customers check out as anaonymous/guests, if they decided anywhere during the checkout process that they would like to go back and edit their shipping or billing address, they are not able to. I get at least 2 phone calls a day from folks who either 1) simply changed their mind about where to ship, or 2) got checkbox happy and accidentally used the "shipping is same as billing" box.

    A side issue is that returning guest customers STILL cannot edit their address on a later visit. The original address they used is cached and cannot be edited without clearing cookies and restarting the browser, which is obviously something you do not want to tell a customer they have to do each time they shop with you.

    I can't imagine how many customers are jumping ship during checkout because they cannot edit their address and would rather buy from someone else than take the time to call in and ask me to change it.

    Anyone out there experiencing the same thing?

    Any guidance is much, much appreciated.

  2. #2
    dkeymel is offline Junior Member
    Join Date
    Jul 2010
    Posts
    8

    Default

    I have this issue. We just discovered it today.

    Was there ever a fix for this or a determination as to what causes it?

  3. #3
    ASPAlfred is offline Senior Member
    Join Date
    Nov 2007
    Posts
    2,244

    Default

    I have tried this here on the same build but I can go back to checkout1.aspx page and edit my shipping and billing address without any problem. Not sure exactly if we're talking on the same page. Can you post your site's URL please, so we can try this out ourselves?

  4. #4
    dkeymel is offline Junior Member
    Join Date
    Jul 2010
    Posts
    8

    Default

    http://www.bagsunlimited.com

    The site lets you "edit" the field, but when you continue to check out it does not actually update the data in the order and when you get to the summary screen the address info reverts to what it was.

  5. #5
    dkeymel is offline Junior Member
    Join Date
    Jul 2010
    Posts
    8

    Default

    I did some debugging. It would seem like the cart looks to see if the customer has an address already assigned. In many cases that result would be that there isn't and that the cart would then create the address entries for the non-registered customer.

    However if the user clicks to edit the order before finishing the process via the link on the following page, or clicks out of the checkout via a category item or some such thing, when they go back through the checkout, the cart recognizes that they have an address assigned. When we get to that point again in the cart where the check is done to see if they have an address they do, so the site skips creating the entry for the address. It does not look to see if the values provided were the same as the ones provided before from what i can tell, and the result is when the values have changed they are lost when continuing the checkout process. a workaround to this appears to be the following, however im not certain its the "best" solution since i think you will end up with a bunch of extra address records if the user does this a lot.

    This is in the checkout1.aspx.cs file on line 1239. There would also be a similar change on line 1211 about.

    C#/VB.NET Code:
                                if (AllowShipToDifferentThanBillTo && !AppLogic.AppConfigBool("SkipShippingOnCheckout"))
                                {
                                    
    ShippingAddress = new Address();
                                    
    //if (ThisCustomer.PrimaryShippingAddressID == 0)
                                    
    if ( true 
                                    {
                                        
    ShippingAddress.LastName ctrlShippingAddress.LastName;
                                        
    ShippingAddress.FirstName ctrlShippingAddress.FirstName;
                                        
    ShippingAddress.Phone ctrlShippingAddress.PhoneNumber

  6. #6
    ASPAlfred is offline Senior Member
    Join Date
    Nov 2007
    Posts
    2,244

    Default

    dkeymel: thanks for pointing this out.

    The changes you've made below would work however, it'll insert a new address (shipping/billing) record in the DB everytime you go back from checkoutreview.aspx to edit the information.

    Try doing the changes below instead:

    Create two private void methods in checkout1.aspx.cs and call them BillingAddressInfo & ShippingAddressInfo.

    #1
    Code:
    private void BillingAddressInfo()
            {
                BillingAddress.LastName = ctrlBillingAddress.LastName;
                BillingAddress.FirstName = ctrlBillingAddress.FirstName;
                BillingAddress.Phone = ctrlBillingAddress.PhoneNumber;
                BillingAddress.Company = ctrlBillingAddress.Company;
                BillingAddress.ResidenceType = (ResidenceTypes)Enum.Parse(typeof(ResidenceTypes), ctrlBillingAddress.ResidenceType, true);//(ResidenceTypes) Convert.ToInt32( ctrlBillingAddress.AddressType);
                BillingAddress.Address1 = ctrlBillingAddress.Address1;
                BillingAddress.Address2 = ctrlBillingAddress.Address2;
                BillingAddress.Suite = ctrlBillingAddress.Suite;
                BillingAddress.City = ctrlBillingAddress.City;
                BillingAddress.State = ctrlBillingAddress.State;
                BillingAddress.Zip = ctrlBillingAddress.ZipCode;
                BillingAddress.Country = ctrlBillingAddress.Country;
            }
    #2
    Code:
     private void ShippingAddressInfo()
            {
                ShippingAddress.LastName = ctrlShippingAddress.LastName;
                ShippingAddress.FirstName = ctrlShippingAddress.FirstName;
                ShippingAddress.Phone = ctrlShippingAddress.PhoneNumber;
                ShippingAddress.Company = ctrlShippingAddress.Company;
                ShippingAddress.ResidenceType = (ResidenceTypes)Enum.Parse(typeof(ResidenceTypes), ctrlShippingAddress.ResidenceType, true);//(ResidenceTypes)Convert.ToInt32(ctrlShippingAddress.AddressType);
                ShippingAddress.Address1 = ctrlShippingAddress.Address1;
                ShippingAddress.Address2 = ctrlShippingAddress.Address2;
                ShippingAddress.Suite = ctrlShippingAddress.Suite;
                ShippingAddress.City = ctrlShippingAddress.City;
                ShippingAddress.State = ctrlShippingAddress.State;
                ShippingAddress.Zip = ctrlShippingAddress.ZipCode;
                ShippingAddress.Country = ctrlShippingAddress.Country;
    
            }
    then, under the ProcessAccount() method, the same line as your changes do the following:

    For BillingAddress:
    Code:
    if (ThisCustomer.PrimaryBillingAddressID == 0)
                            {
                                BillingAddress = new Address();
    
                                BillingAddressInfo();
                                BillingAddress.EMail = EMailField;
    
                                BillingAddress.InsertDB(ThisCustomer.CustomerID);
                                BillingAddress.MakeCustomersPrimaryAddress(AddressTypes.Billing);
                                ThisCustomer.PrimaryBillingAddressID = BillingAddress.AddressID;
                                
                                
                            }
                            else
                            {
                                BillingAddressInfo(); 
                                BillingAddress.EMail = EMailField;
    
                                BillingAddress.UpdateDB();
                            }
    For ShippingAddress:
    Code:
    if (AllowShipToDifferentThanBillTo && !AppLogic.AppConfigBool("SkipShippingOnCheckout"))
                            {
                                
                                if (ThisCustomer.PrimaryShippingAddressID == 0)
                                {
                                    ShippingAddress = new Address();
                                    ShippingAddressInfo();
                                    ShippingAddress.EMail = EMailField;
    
                                    ShippingAddress.InsertDB(ThisCustomer.CustomerID);
                                    ShippingAddress.MakeCustomersPrimaryAddress(AddressTypes.Shipping);
                                    ThisCustomer.PrimaryShippingAddressID = ShippingAddress.AddressID;
                                    
                                }
                                else
                                {
                                    ShippingAddressInfo(); 
                                    ShippingAddress.EMail = EMailField;
    
                                    ShippingAddress.UpdateDB();
                                }
                                
                            }
    Instead of calling the InsertDB() method (which will insert new address record in the DB everytime it's called), we'll use the UpdateDB() instead to only update whatever changes made.