Purchase Order Form Issues
- ImmortalLogic
- Lieutenant (LT)
- Posts: 61
- Joined: Tue May 11, 2010 9:29 am
Purchase Order Form Issues
Working with Able Gold 10, how can I include additional fields from my form in the Account Data for the PurchaseOrderPaymentForm.ascs.cs? The AccountData only seems to store the Purchase Order Number. What do I need to set to append additional fields to AccountData. Also is this account data a field in Payments (AccountDataEncrypted)? As you can see by my posts, I have had a rough time with this store.
In GetPayment() I have:
..... code....
AccountDataDictionary instrumentBuilder = new AccountDataDictionary();
PurchaseOrderNumber.Text = StringHelper.StripHtml(PurchaseOrderNumber.Text);
instrumentBuilder["PurchaseOrderNumber"] = PurchaseOrderNumber.Text;
payment.ReferenceNumber = PurchaseOrderNumber.Text;
BankName.Text = StringHelper.StripHtml(BankName.Text);
instrumentBuilder["BankName"] = BankName.Text;
BankAccount.Text = StringHelper.StripHtml(BankAccount.Text);
instrumentBuilder["BankAccount"] = BankAccount.Text;
BankPhoneNumber.Text = StringHelper.StripHtml(BankPhoneNumber.Text);
instrumentBuilder["BankPhoneNumber"] = BankPhoneNumber.Text;
TaxID.Text = StringHelper.StripHtml(TaxID.Text);
instrumentBuilder["TaxID"] = TaxID.Text;
payment.AccountData = instrumentBuilder.ToString();
return payment;
In GetPayment() I have:
..... code....
AccountDataDictionary instrumentBuilder = new AccountDataDictionary();
PurchaseOrderNumber.Text = StringHelper.StripHtml(PurchaseOrderNumber.Text);
instrumentBuilder["PurchaseOrderNumber"] = PurchaseOrderNumber.Text;
payment.ReferenceNumber = PurchaseOrderNumber.Text;
BankName.Text = StringHelper.StripHtml(BankName.Text);
instrumentBuilder["BankName"] = BankName.Text;
BankAccount.Text = StringHelper.StripHtml(BankAccount.Text);
instrumentBuilder["BankAccount"] = BankAccount.Text;
BankPhoneNumber.Text = StringHelper.StripHtml(BankPhoneNumber.Text);
instrumentBuilder["BankPhoneNumber"] = BankPhoneNumber.Text;
TaxID.Text = StringHelper.StripHtml(TaxID.Text);
instrumentBuilder["TaxID"] = TaxID.Text;
payment.AccountData = instrumentBuilder.ToString();
return payment;
Re: Purchase Order Form Issues
Yes in AccountData simply serves the decrypted contents from AccountDataEncrypted field in payments table.Also is this account data a field in Payments (AccountDataEncrypted)?
It should be very easy to add custom data since AccountDataDictionary is a dictionary structure. You can add new fields into dictionary by doing something like thishow can I include additional fields from my form in the Account Data for the PurchaseOrderPaymentForm.ascs.cs
Code: Select all
instrumentBuilder["CustomField"] = "Custom Value Here";
Code: Select all
AccountDataDictionary instrumentBuilder = new AccountDataDictionary(payment.AccountData);
string value = instrumentBuilder.GetValue("CustomField");
- ImmortalLogic
- Lieutenant (LT)
- Posts: 61
- Joined: Tue May 11, 2010 9:29 am
Re: Purchase Order Form Issues
My problem is that I am not able to view the field results in the database. My PurchaseOrderPaymentForm as several fields but it doesn't appear that anything is added to the instrumentBuilder other than the default field, PurchaseOrderNumber (PurchaseOrderNumber.Text). The results from my custom fields are not added. When I view the Account Details (within the Admin) under Order - Payments (Default.aspx), I see the Purchase Order Number, but that is it. I know I must be missing something.
Thanks
Thanks
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
Re: Purchase Order Form Issues
If you are going to want it to display for admins only, you could try intercepting the purchase order number and tacking information on to it.
instrumentBuilder["PurchaseOrderNumber"] = PurchaseOrderNumber.Text + "whatever";
instrumentBuilder["PurchaseOrderNumber"] = PurchaseOrderNumber.Text + "whatever";
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
-
- Commodore (COMO)
- Posts: 436
- Joined: Tue May 07, 2013 1:59 pm
Re: Purchase Order Form Issues
Make sure your code to save the fields in PurchaseOrderPaymentForm is running by using the debugger or by writing message() to the error log. You could check the AccountData field (i.e. see if all the dictionary entries are there) right before the "return Payment" statement, and right before the redirect to the receipt page.
What code are you using in Order/Payments/Default.aspx.cs to retrieve the fields?
What code are you using in Order/Payments/Default.aspx.cs to retrieve the fields?
Jay
- ImmortalLogic
- Lieutenant (LT)
- Posts: 61
- Joined: Tue May 11, 2010 9:29 am
Re: Purchase Order Form Issues
Thanks for your help. However, it appears that the file PurchaseOrderPaymentForm.ascs.cs which includes GetPayment() isn't functioning? I have commented out the code, even removed the file (the mobile and even the file in the Admin, and the back up files) and it still processes the PO number entered into the form. How is the Purchase Order Number entered into PurchaseOrderNumber.Text maintained? I ran a query on the Payments and the AccountDataEncrypted still has the Purchase Order Number. So, what is holding on to this entry and how is it sent to the database? I cannot see any associated files for it.
As of now, I am trying to see where it is going instead of actually reading it. With the debugger, there are no errors related to this issue.
As of now, I am trying to see where it is going instead of actually reading it. With the debugger, there are no errors related to this issue.
-
- Commodore (COMO)
- Posts: 436
- Joined: Tue May 07, 2013 1:59 pm
Re: Purchase Order Form Issues
Are you using the Web Application Project (WAP) or the Web Site Project (WSP)? If you are using the WAP, I think you need to recompile the project after you make changes. I only use the WSP, so I can't provide any help beyond that for the WAP. If you are using the WSP, it certainly shouldn't keep working if you remove the file. Are you sure you are editing the files in (or copying the edited files to) the location they are being served from?
Jay
- ImmortalLogic
- Lieutenant (LT)
- Posts: 61
- Joined: Tue May 11, 2010 9:29 am
Re: Purchase Order Form Issues
I am using the WSP version.Are you using the Web Application Project (WAP) or the Web Site Project (WSP)?
I have checked the PurchaseOrderPaymentForm.ascx.cs in
\Mobile\
\Admin\
\Conlib\ <---- is the appropriate directory as I am performing transactions as a "customer" for testing. The form looks fine, but not sure where the data is going.
Anyone else run into this issue?