Setting one checkout payment method as default.

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Setting one checkout payment method as default.

Post by jmestep » Tue Feb 10, 2009 7:53 am

I've had to re-order the payment methods on the checkout page, but still need to set a method other than the Charge Card method as the default that is checked when a customer first comes to the page. I've spent some time on it, but am still unable to do that. How can I do that? Is it because it's in ajax and I can't get to it?
Thanks
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

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

Re: Setting one checkout payment method as default.

Post by mazhar » Tue Feb 10, 2009 8:30 am

First find out the PaymentMethodId which you want to be selected from database then locate the following lines in the onepagecheckout code

Code: Select all

//MAKE SURE THE CORRECT PAYMENT METHOD IS SELECTED
                int paymentMethodId = AlwaysConvert.ToInt(Request.Form[PaymentMethodList.UniqueID]);
and update them as below

Code: Select all

//MAKE SURE THE CORRECT PAYMENT METHOD IS SELECTED
string val = Request.Form[PaymentMethodList.UniqueID];
                int paymentMethodId = 8;
                if(val != null)
                    paymentMethodId = AlwaysConvert.ToInt(val);
Where 8 was the payment method id of Pay by phone call which i want to be selected by default.

Post Reply