automatically fill name on card field

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
meer2005
Captain (CAPT)
Captain (CAPT)
Posts: 245
Joined: Wed Feb 09, 2005 2:00 pm

automatically fill name on card field

Post by meer2005 » Fri Oct 03, 2008 1:31 pm

In the admin when you add an additional payment, it automatically fills the field with the bill to name.

CardName.Text = _Order.BillToFirstName + " " + _Order.BillToLastName;

Does anyone know the call out name of the 'name on card' field so it will automatically fill the name the customer actually entered previously for the name on card field. They bill to name and name on card do not always match.

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

Re: automatically fill name on card field

Post by jmestep » Fri Oct 03, 2008 2:47 pm

I couldn't find that it is stored anywhere, so it wouldn't be available later.
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: automatically fill name on card field

Post by mazhar » Mon Oct 06, 2008 6:28 am

Edit theWebsite\Admin\Orders\Payments\ucProcessPayment.ascx file and locate the following line in it

Code: Select all

CardName.Text = _Order.BillToFirstName + " " + _Order.BillToLastName;
and make it look like as below

Code: Select all

if (_Order.Payments.Count > 0)
        {
            AccountDataDictionary aacountDataDic = new AccountDataDictionary(_Order.Payments[0].AccountData);
            CardName.Text = aacountDataDic["AccountName"];
        }
        else    
            CardName.Text = _Order.BillToFirstName + " " + _Order.BillToLastName;

Post Reply