Checkout Page with Login

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
dpr1016
Ensign (ENS)
Ensign (ENS)
Posts: 10
Joined: Wed Nov 14, 2007 11:56 am

Checkout Page with Login

Post by dpr1016 » Tue Dec 04, 2007 9:12 am

I am wondering how to utilize the Checkout Page with Login. We do not want anonymous checkout, and we want users to login in between the basket page and checkout page (if they aren't already). I tried changing the scriplet on the checkout page from One Page Checkout to Checkout Page with Login. Doing this does pull up the checkout login page, but it doesn't recognize if a user is logged in, and when a user does login it just returns back to the same checkout login page.

dittohead
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 36
Joined: Mon Jan 14, 2008 3:14 pm
Location: Dayton, Ohio

Re: Checkout Page with Login

Post by dittohead » Wed May 14, 2008 10:48 am

Could a programmer or adminstrator please respond to this issue? We have the same problem with this page and our stores will require that the user is registered before actually placing their order?

Thank-You!

User avatar
bobr2k
Commander (CMDR)
Commander (CMDR)
Posts: 183
Joined: Fri Oct 26, 2007 2:31 pm
Location: Illinois

Re: Checkout Page with Login

Post by bobr2k » Wed May 14, 2008 11:09 am

We've just turned on our payment gateway in a test mode and preparing to start up the website live.
We've done no special programming but I just tried to enter an order anonymously and was not allowed to do so. I had to enter an email address and create a password to get past the payment page.
Bob R.
"Bills travel through the mail at twice the speed of checks." -- Steven Wright

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: Checkout Page with Login

Post by jmestep » Wed May 14, 2008 11:44 am

On the one page checkout, users are going to have to login by one of two methods:
If they have an existing account, there is a link to login.
If they don't, they will have to put in the billing info, then Able checks to see if there is already someone there with the same email address and if so, they login as that person.
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

dittohead
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 36
Joined: Mon Jan 14, 2008 3:14 pm
Location: Dayton, Ohio

Re: Checkout Page with Login

Post by dittohead » Wed May 14, 2008 12:03 pm

Judy,

I am currently testing this page.

I logged in as a user, added item(s) to the basket and then proceeded to checkout. I am asked to login or register if I am a new user. When I log in I get the same login page as if I was not logged in. However, I am logged in as a user, but I cannot get by this page to the next page in the checkout process.

Any ideas?

Dave

User avatar
bobr2k
Commander (CMDR)
Commander (CMDR)
Posts: 183
Joined: Fri Oct 26, 2007 2:31 pm
Location: Illinois

Re: Checkout Page with Login

Post by bobr2k » Wed May 14, 2008 12:29 pm

jmestep wrote:Able checks to see if there is already someone there with the same email address and if so, they login as that person.
after they provide the correct password for that email address! (when I first read your note it sent chills down my spine.) :mrgreen:
Bob R.
"Bills travel through the mail at twice the speed of checks." -- Steven Wright

dittohead
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 36
Joined: Mon Jan 14, 2008 3:14 pm
Location: Dayton, Ohio

Re: Checkout Page with Login

Post by dittohead » Thu May 15, 2008 10:49 am

Does anyone know why the next page in the checkout process will not display after the customer has logged in?

User avatar
bobr2k
Commander (CMDR)
Commander (CMDR)
Posts: 183
Joined: Fri Oct 26, 2007 2:31 pm
Location: Illinois

Re: Checkout Page with Login

Post by bobr2k » Thu May 15, 2008 12:12 pm

if you provide a little more info. maybe someone can help. are you getting past the shipping methods? Are there any messages in the error log? Do you have ssl=yes and payment gateways set up with payment methods connected? are products connected to a warehouse?
Bob R.
"Bills travel through the mail at twice the speed of checks." -- Steven Wright

dittohead
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 36
Joined: Mon Jan 14, 2008 3:14 pm
Location: Dayton, Ohio

Re: Checkout Page with Login

Post by dittohead » Thu May 15, 2008 2:11 pm

Thanks for responding!

After my last posting, I went back to the store web pages and found that in the navigationhelp.cs file the code to handle the checkout with login was commented out. there is even a comment to uncomment for one page checkout. There are 3 places that will need to be changed to get this feature to work correctly.

User avatar
bobr2k
Commander (CMDR)
Commander (CMDR)
Posts: 183
Joined: Fri Oct 26, 2007 2:31 pm
Location: Illinois

Re: Checkout Page with Login

Post by bobr2k » Fri May 16, 2008 8:51 am

I did some more checking because I was curious why our site is not allowing anonymous checkout and we had done nothing special to prevent it. from conlib\onepagecheckout.ascx (which we are using)
<param name="AllowAnonymousCheckout" default="false">Possible values are true or false. When true, customers are allowed to check out without creating a user account.</param>
</conlib>
I don't know if this will satisfy your needs but there it is.
Bob R.
"Bills travel through the mail at twice the speed of checks." -- Steven Wright

jdarby
Commander (CMDR)
Commander (CMDR)
Posts: 151
Joined: Thu Sep 25, 2008 2:21 pm

Re: Checkout Page with Login

Post by jdarby » Tue Nov 18, 2008 12:36 pm

I'm having this same issue that dittohead experienced.

I just enabled the "Checkout with Login" scriptlet for the checkout page.

User is logged out, adds product, clicks Checkout and lands on the "Checkout with Login" page. Whether I attempt to login with an existing account or register a new one, it doesn't let me past this login page. It will log the user in but does not go past the login page.

I did a search for the navigationhelp.cs file that dittohead referenced but my install doesn't have this file, maybe due to a newer version. Any ideas?

Using AbleCommerce 7.0 build 10152

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

Re: Checkout Page with Login

Post by mazhar » Tue Nov 18, 2008 1:35 pm

In the App_Code/NavigationHelper.cs file locate the all three overloads of GetCheckoutUrl method and remove the comments from code commented for OnePageCheckout as below

Code: Select all

public static string GetCheckoutUrl()
    {
        
        //COMMENTING OUT FOR ONE PAGE CHECKOUT
        return GetCheckoutUrl(HttpContext.Current.User.Identity.IsAuthenticated);
        
        /*
        return "~/Checkout/Default.aspx";
         */ 
    }

    /// <summary>
    /// Gets the url required to begin checkout
    /// </summary>
    /// <param name="isAuthenticated">A flag indicating whether the URL should be returned for an authenticated user.</param>
    /// <returns>A string containing the checkout url</returns>
    /// <remarks>Authenticated users may have a different checkout starting point than anonymous users.</remarks>
    public static string GetCheckoutUrl(bool isAuthenticated)
    {
        
        //COMMENTING OUT FOR ONE PAGE CHECKOUT
        if (isAuthenticated)
        {
            // FIND IF THE USER HAS A VALID ADDRESS
            bool hasValidAddress = false;
            foreach(CommerceBuilder.Users.Address address in Token.Instance.User.Addresses){
                if (address.IsValid)
                {
                    hasValidAddress = true;
                    break;
                }
            }

            if (hasValidAddress) return "~/Checkout/ShipAddress.aspx";
            else
            {
                int addressId = Token.Instance.User.PrimaryAddress.AddressId;
                if (addressId != 0) return "~/Checkout/EditShipAddress.aspx?AddressId=" + addressId.ToString();
                return "~/Checkout/EditShipAddress.aspx";
            }
        }
        
        return "~/Checkout/Default.aspx";
    }

    /// <summary>
    /// Gets the url required to begin checkout
    /// </summary>
    /// <param name="isAuthenticated">A flag indicating whether the URL should be returned for an authenticated user.</param>
    /// <returns>A string containing the checkout url</returns>
    /// <remarks>Authenticated users may have a different checkout starting point than anonymous users.</remarks>
    public static string GetCheckoutUrl(bool isAuthenticated,bool isShipAddress)
    {
        
        //COMMENTING OUT FOR ONE PAGE CHECKOUT
        if (isAuthenticated)
        {
            // FIND IF THE USER HAS A VALID ADDRESS
            bool hasValidAddress = false;
            foreach (CommerceBuilder.Users.Address address in Token.Instance.User.Addresses)
            {
                if (address.IsValid)
                {
                    hasValidAddress = true;
                    break;
                }
            }

            if (hasValidAddress && isShipAddress) return "~/Checkout/ShipAddress.aspx";
            else
                if (hasValidAddress && !isShipAddress) return "~/Checkout/ShipMethod.aspx";
            else
            {
                int addressId = Token.Instance.User.PrimaryAddress.AddressId;
                if (addressId != 0) return "~/Checkout/EditShipAddress.aspx?AddressId=" + addressId.ToString();
                return "~/Checkout/EditShipAddress.aspx";
            }
        }
        
        return "~/Checkout/Default.aspx";
    }
If in future if you need OnePageCheckout then you have to comment out this code again.

jdarby
Commander (CMDR)
Commander (CMDR)
Posts: 151
Joined: Thu Sep 25, 2008 2:21 pm

Re: Checkout Page with Login

Post by jdarby » Tue Nov 18, 2008 1:56 pm

I've edited my NavigationHelpter.cs file so that it reads like this:
Last edited by jdarby on Tue Jul 28, 2009 12:31 pm, edited 1 time in total.

jdarby
Commander (CMDR)
Commander (CMDR)
Posts: 151
Joined: Thu Sep 25, 2008 2:21 pm

Re: Checkout Page with Login

Post by jdarby » Tue Nov 18, 2008 2:19 pm

Nevermind, it was doing something goofy with the backup copy of the Navigationhelper.cs file i made. All is well and seems to be working, thank you!

Post Reply