Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 General help me questions
 Display Orders: add oauthorization status
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

nxpage
Starting Member

49 Posts

Posted - January 15 2007 :  14:13:47  Show Profile  Reply with Quote
We need to be able to see right up front on all grids/views that display orders whether or not it's a valid order, to show the response from the gateway.

In shopa_displayorders.asp I changed fieldnames(5) from country (not used) to oauthorization:

fieldnames(5)="oauthorization"
HeadNames(5)="CCD Auth"

The oauthorization field is very long and I'd like to trim it to just return the first 25 characters. I've tried a number of ways but getting error. What is the correct syntax to make this work?

Tried fieldnames(5)=left("oauthorization",25) but that doesn't work either.

*** EDIT *** Ideally I would just like to display a red * if the order was declined or errored out in any way.



Edited by - nxpage on January 15 2007 14:19:34

k-otic
Starting Member

49 Posts

Posted - January 21 2007 :  21:48:01  Show Profile  Reply with Quote
This is a bit of a fiddly one - should be a bit easier to modify i think but anyways...

fieldnames(5) has to be the actual database field name so have fieldnames(5)="oauthorization"

Then in the sub generatetable routine you can see lines of code like:

case "ORDERAMOUNT"
response.write "<td>"
response.write shopformatcurrency (rsorder(fieldname),getconfig("xdecimalpoint"))
response.write "</td>"


You need to add another one of these for oauthorization. eg:

case "OAUTHORIZATION"
response.write "<td>"
response.write left(rsorder(fieldname),25)
response.write "</td>"


I think that'll do it for you.

Cheers
Go to Top of Page

nxpage
Starting Member

49 Posts

Posted - January 25 2007 :  13:59:18  Show Profile  Reply with Quote
Thanks k-otic! Worked like a charm. Now able to highlight declined transactions as well with that snippet of code help. A simple way to exclude declined $ transactions from sales figures would be nice :)
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000
0 Item(s)
$0.00