Page 1 of 1

IsUsingOnePagecheckout()

Posted: Thu Aug 27, 2009 12:09 pm
by jmestep
Does anyone know where this is set? I'm trying to get a site to use one page checkout only and it isn't working like it does on other 7.0.3 sites. We moved it from another hoster, so I've also been looking thru the database.
Normally you can change the code on the Basket.ascx.cs to false, as below, and that fixes it.
protected void CheckoutButton_Click(object sender, EventArgs e)
{
BasketHelper.SaveBasket(BasketGrid);
Response.Redirect(NavigationHelper.GetCheckoutUrl(false));
}

I've even tried hardcoding the one page checkout in the Navigation helper, but it still directs to login page and then to multi page checkout.
Thanks

Re: IsUsingOnePagecheckout()

Posted: Thu Aug 27, 2009 12:51 pm
by ZLA
In

Code: Select all

Response.Redirect(NavigationHelper.GetCheckoutUrl(false));
the boolean value is for isAuthenticated and is independent of IsUsingOnePagecheckout. If you look inside NavigationHelper.cs, you will see that WebflowManager.IsUsingOnePageCheckout() is a compiled function, so I don't know what determines it's value.

But if you follow the logic in GetCheckoutUrl, you will see that if WebflowManager.IsUsingOnePageCheckout() returns false and the user is not authenticated and they don't have a valid user address, then it goes to ShipAddress.aspx.

I don't know the consequences, but you could just change that line from ShipAddress.aspx to Default.aspx. Again, I don't know if that's a bad idea or not.

Regards.

Re: IsUsingOnePagecheckout()

Posted: Thu Aug 27, 2009 2:01 pm
by jmestep
Thanks. I had taken out the logic and hardcoded the link in both sections of the navigation helper code and it was still redirecting. Maybe it's got something to do with DNS and the store key, because the site isn't operating on a domain name and when I apply the key for the domain name, it changes the ip in the license file to the old hoster.
Looking at source code, I see that the indicator might be stored in a personalization.
I'll check that.

Re: IsUsingOnePagecheckout()

Posted: Fri Aug 28, 2009 4:38 pm
by Logan Rhodehamel
ZLA wrote:the boolean value is for isAuthenticated and is independent of IsUsingOnePagecheckout. If you look inside NavigationHelper.cs, you will see that WebflowManager.IsUsingOnePageCheckout() is a compiled function, so I don't know what determines it's value.
We have to determine whether or not your checkout page is using the OnePageCheckout control. This can be altered in a variety of ways - for example you could change the page scriptlet using the page footer editor. So we have to check many things, possibly even decrypting the microsoft personalization BLOB and reading the data. These are complex and expensive tasks, so once we determine the value it's cached with appropriate dependencies.

Re: IsUsingOnePagecheckout()

Posted: Sat Aug 29, 2009 6:39 am
by jmestep
Thanks, Logan. That was the tip I needed- changing the scriplet. She was using checkout page with login, which I didn't know even existed!