Change sort order of Shipping Method

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
lbrewerandassoc
Ensign (ENS)
Ensign (ENS)
Posts: 13
Joined: Wed May 27, 2009 4:17 pm

Change sort order of Shipping Method

Post by lbrewerandassoc » Tue Jan 12, 2010 2:34 pm

I need to have the Shipping Method Dropdownlist (ID= ShipMethodList) in the OnePagecheckout sorted by Rate amount (sorted by least expensive shipping option to most expensive.)

I assume you can do this, but I can't see how.

Also (question 2) -- I saved the OnePageCheckout.ascx & .ascx.cs to ConLib/Custom/OnePageCheckout.ascx & .ascx.cs. Then I changed the scriptlet code in the Checkout/default page. However, after I do this & go through the site and click "Checkout Now" - I'm redirected through a multi-page checkout process.

It is like a sesssion var or something is not set properly. I only changed a few simple text items in the OnePageCheckout, but it throws everything off. I haven't spent a lot of time yet researching this behavior, but thought that someone out there may know a quick answer from previous experience?

Thanks.

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

Re: Change sort order of Shipping Method

Post by jmestep » Tue Jan 12, 2010 4:59 pm

On re-ordering the shipping methods, AbleMods posted an update to code he had posted earlier that re-orders them and also displays them as radio buttons. It might be in Good Reference Posts.
On the checkout routing, that can be fixed to send people to the one page checkout only by changing a line on the basket and minibasket .cs files.
In the basket file it is
if (basketValid) Response.Redirect(NavigationHelper.GetCheckoutUrl(false)); //add the false
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

lbrewerandassoc
Ensign (ENS)
Ensign (ENS)
Posts: 13
Joined: Wed May 27, 2009 4:17 pm

Re: Change sort order of Shipping Method

Post by lbrewerandassoc » Wed Jan 13, 2010 7:06 am

Thanks for your response!

I still have a question about the GetCheckoutUrl(false)....

Would it be "more correct" to just change the App_Code/NavigationHelper.cs code (circa line 186) & comment out all the code regarding the redirect to EditBillAddress.aspx? (see below).

I'm also still confused why this works fine if I use the supplied ConLib OnePageCheckout, but as soon as I make a copy & change my scriptlets to use Custom\OnePageCheckout, then it all falls apart & starts redirecting me to "editbilladdress". Why isn't the Custom page working exactly as the non-custom conlib?

public static string GetCheckoutUrl(bool isAuthenticated)
{
//if (!WebflowManager.IsUsingOnePageCheckout()) // comment out
//{
//if (isAuthenticated) // comment out
//{
//return "~/Checkout/EditBillAddress.aspx"; // comment out
//}
//}
return "~/Checkout/Default.aspx";
}

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

Re: Change sort order of Shipping Method

Post by jmestep » Wed Jan 13, 2010 2:34 pm

I don't know that the OPC put in the custom folder would affect it.
The difference with the default code is that if your are logged in before checkout, you go to the multi page checkout.
If you start checking out and then log in, you stay on the one page checkout.
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

DeannaLS
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 39
Joined: Mon Apr 03, 2006 4:59 pm

Re: Change sort order of Shipping Method

Post by DeannaLS » Fri Mar 05, 2010 2:19 pm

jmestep wrote:I don't know that the OPC put in the custom folder would affect it.
I'm seeing the same very annoying behavior. I think it's a bug. Creating a custom conlib with the same code shouldn't muck it up that much. I'd prefer not to change the basket files. Frustrating.

Post Reply