Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 VP-Cart 8.00 Issues
 [Solved] Display Orders (admin) - add column
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

jack208
VP-CART New User

Malaysia
116 Posts

Posted - November 30 2015 :  09:48:41  Show Profile  Reply with Quote
Does anyone know whether it''s possible to add one more column (field) to the Display Orders table (in Admin)?

Currently one of the fields it shows is Last Name. We wanted to add First Name next to it. I tried to add a column into the SetFieldNames sub in shopa_displayorders.asp but it gave me an error saying it hit subscript error (number: 7)

The current value is 6 so it might mean there''s a hard lock to make it 6 cols (since there are other columns that also need to be displayed.


Edited by - jack208 on December 03 2015 10:52:02

carfin
VP-CART Expert

United Kingdom
948 Posts

Posted - December 03 2015 :  06:41:26  Show Profile  Reply with Quote
Hi Jack,

Save a copy and open file shopa_displayorders.asp

Near the start of the code you should see a list of variables including

dim Headnames(6)
dim Fieldnames(6)


Increase the integer to 7 in each array


Then find the sub setfieldNames and overwrite the fieldnames and headnames with the following :


Fieldcount = 7
fieldnames(0) = "orderid"
fieldnames(1) = "ocustomerid"
fieldnames(2) = "odate"
fieldnames(3) = "orderamount"
fieldnames(4) = "ofirstname"
fieldnames(5) = "olastname"
fieldnames(6) = "ocountry"
fieldnames(7) = "ocardtype"
headnames(0) = "orderid"
headnames(1) = "customerid"
Headnames(2) = GetLang("langDisplayDate")
Headnames(3) = GetLang("langDisplayAmount")
HeadNames(4) = GetLang("langCustFirstName")
Headnames(5) = GetLang("langCustLastName")
HeadNames(6) = GetLang("langCustCountry")
HeadNames(7) = GetLang("LangCheckoutPaymentType")


Save and test.

Hope this helps.

Regards,

Carrol
www.deanston-electrical.co.uk
Go to Top of Page

jack208
VP-CART New User

Malaysia
116 Posts

Posted - December 03 2015 :  08:24:37  Show Profile  Reply with Quote
Ah thanks a lot Carrol. I''d made the same change (in the sub) but forgot to change the dimension of the variables... that''s what I got hit with the subscript out of range error. This should work now. Thanks
Go to Top of Page

serjtankian
VP-CART Super User

Armenia
378 Posts

Posted - December 09 2015 :  14:21:15  Show Profile  Visit serjtankian's Homepage  Reply with Quote
nice tutorial carrol!






*serj*
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