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
Setting one checkout payment method as default.
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
Setting one checkout payment method as default.
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
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
Re: Setting one checkout payment method as default.
First find out the PaymentMethodId which you want to be selected from database then locate the following lines in the onepagecheckout code
and update them as below
Where 8 was the payment method id of Pay by phone call which i want to be selected by default.
Code: Select all
//MAKE SURE THE CORRECT PAYMENT METHOD IS SELECTED
int paymentMethodId = AlwaysConvert.ToInt(Request.Form[PaymentMethodList.UniqueID]);
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);