Author |
Topic |
|
Admiral The X
VP-CART New User
USA
52 Posts |
Posted - January 24 2009 : 01:27:59
|
anyone know how i might go about adding a row to the shoprestoreorder.asp (order history) page.
i would like to add a row where i can display the 1z numbers that can be added through the backend. It does not seem as though the customer has anywhere on the site where they can go to view 1z's so i would like to add it here.
Thanks |
|
madbug
VP-CART New User
130 Posts |
Posted - February 11 2009 : 17:46:07
|
Hello There,
Do you mean by adding a column under the page "shopstatus.asp" ? as for "shoprestoreorder.asp" will redirect you to the "shopaddtocart.asp" page.
If you wish to create a new column under "shopstatus.asp", please follow the step below
1) Open "shopstatus.asp" 2) Locate the code:
Fields(7)="" ' keyword
modify it to:
Fields(7)="ocardtype" ' keyword (enter the field name in your orders table)
4) Locate the code:
Captions(6)=getlang("LangStatusProcessed")
add in a new code below it:
Captions(7)="Payment Type" (or, you can enter the language keyword, such as getlang("langcheckoutpaymenttype") for translation purposes)
5) Locate the code:
fieldcount=6
modify it to:
fieldcount=7
6) Save the file
The above changes will add in additional column for Payment Type and it will retrieve the data from the Orders table.
Thanks.
|
|
|
Admiral The X
VP-CART New User
USA
52 Posts |
Posted - February 11 2009 : 19:16:14
|
i considdered adding a col to the shop status pave, but the tracking number is very long (18 characters). there is not enough room horizontally on the screen to add that col and keep the page structure in tact.
from that page when the user click on their order number it brings up all of their order details. Payment type shipping information etc.
i was hoping to be able to add below shipping method
which for example currently returns Shipping Method UPS Ground Weight=1.2
Tracking number - 1z(account number) (service code) (package code) (check bit) = 18 bytes or tracking number = 1zXXXYYY0312345671
I just had a hard time finding where in the code the "shipping information" section was generated for the shoprestoreorder.asp file. |
|
|
Admiral The X
VP-CART New User
USA
52 Posts |
Posted - February 11 2009 : 21:18:31
|
as i look through this, i'm thinking maybe the same routine is used to build this as the one that is used to display the "reciept" after you check out. making a check to see if the order was process, or if a 1znumber exists, then display the 1znumber would be perfect. but i'm still at a loss for where the shipment information gets created. i dont think i see it in the shoprestoreorder.asp. i cant remember the file that gets called after checkout. |
|
|
Admiral The X
VP-CART New User
USA
52 Posts |
Posted - February 11 2009 : 23:10:30
|
OK, i figured it out! In the file - ShopFormatOrder.asp there is a routine that creates the segment of the screen i was interested in Sub FormatCustomer
DoHeader_Order getlang("LangFormatShippingInformation") prints the "shipping information" header DoField_Order getlang("LangShippingMethod"),stroshipmethodtype prints the shipping method
below this I added if strupstrackno <> "" then Dofield_Order "Tracking Number", "<a href=""http://wwwapps.ups.com/WebTracking/processInputRequest?TypeOfInquiryNumber=T&InquiryNumber1=" & strupstrackno & """ target=""_blank"">" & strupstrackno & "</a>" end if
if the tracking number is NOT blank the row will be printed with the tracking number in it as a link to UPS.com's tracking section target new window.
To get this working you must first define the variable you are going to use at the head of the shopformatorder.asp file I chose Dim strupstrackno
and you must also assign the variable a value from the query that reads the values in the order table. Sub GetOrderData strupstrackno = orders("upstrackno") |
|
|
Admiral The X
VP-CART New User
USA
52 Posts |
Posted - February 13 2009 : 09:57:56
|
I should also mention... this modification will also ad the tracking number with link to ups.com to the backend order view page. So after you first enter a tracking number you will be abkle to track them with two clicks from the vpasp backend. |
Edited by - Admiral The X on February 28 2009 17:55:47 |
|
|
Sew-N-2-U
Starting Member
47 Posts |
Posted - April 16 2009 : 20:51:40
|
I am also looking at changing the shopstatus.asp to show order #, date, products on the order, points, print. I can figure out how to edit out the stuff I don't want, but how do I add the product name to show here so they don't have to open every order? Any help would be greatly appreciated. Thanks, Patty |
|
|
Admiral The X
VP-CART New User
USA
52 Posts |
Posted - April 16 2009 : 23:45:57
|
(vpasp 6.5)
in the shopstatus.asp file this section is responsible for creating those items
Sub OrderTableHeader Creates the header row.
this routine adds the fields Select Case fields(i) Case "RESTORE" CreateRestoreLink fieldvalue, objrs("orderid") Case "TRACK" CreateTrackLink fieldvalue, objrs("orderid") Case "PRINT" CreatePrintLink fieldvalue, objrs("orderid") case "ORDERAMOUNT" fieldvalue=objrs(fields(i)) fieldvalue=shopformatcurrency(fieldvalue,Getconfig("xdecimalpoint")) Case "OPROCESSED" fieldvalue=objrs(fields(i)) DisplayProcessed fieldvalue case "ORDERID" CreateViewLink fieldvalue, objrs("orderid") case "OSTATUS" fieldvalue=objrs(fields(i)) DisplayStatus fieldvalue case "OPOINTS" fieldvalue=objrs(fields(i)) if isnull(fieldvalue) then fieldvalue=getlang("langcommonNo") end if ' VP-ASP 6.50 Case "RMA" CreateRMALink fieldvalue, objrs("orderid") Case Else fieldvalue=objrs(fields(i)) end select
at the end of that there is a writeline which writes each row to the table
response.write ReportDetailColumn & fieldvalue & ReportDetailcolumnEnd
if you change the header literals and modify the items output for each row you should be able to make the page display what ever you like.
Air Armory - Airsoft http://www.AirArmory.com - shop http://sitrep.airarmory.com - news |
|
|
Admiral The X
VP-CART New User
USA
52 Posts |
Posted - April 17 2009 : 00:47:23
|
I just did the following mod - removed the "status" field, renamed the "track" field to "Msg" because its for sending tracking messages not for tracking packages, and made the processed field say yes, no or a UPS 1z tracking number with link to UPS.com OrderFormatRow...
Case "OPROCESSED" fieldvalue=objrs(fields(i)) DisplayProcessed fieldvalue, objrs("upstrackno") 'added the passing of the tracking number
Sub CreateTrackLink (fieldvalue, oid) dim my_link my_link="shopcusttracking.asp?oid=" & oid fieldvalue="<a href=""" & my_link & """>" & "Send" & "</a>" 'changed "YES" to send end sub
Sub DisplayProcessed (fieldvalue, UPSTrk) 'VP-ASP 6.50 - broadened defintion of IF statement to cover cases where xmysql hasn't been set if ucase(xdatabasetype) = "MYSQL" OR ucase(xdatabasetype) = "MYSQL351" OR getconfig("xMYSQL")="Yes" then If fieldvalue then fieldvalue=1 else fieldvalue=0 end if end if if fieldvalue<>0 then if UPSTrk <> "" and isnull(UPSTrk) <> true then fieldvalue = "<a href=""http://wwwapps.ups.com/WebTracking/processInputRequest?TypeOfInquiryNumber=T&InquiryNumber1=" & UPSTrk & """ target=""_blank"">" & UPSTrk & "</a>"
else Fieldvalue = "Yes" end if else fieldvalue=getlang("LangCommonNo") end if end sub
Sub OrderTableHeader dim i Fields(0)="ORDERID" Fields(1)="ORDERAMOUNT" Fields(2)="Odate" Fields(3)="ofirstname" Fields(4)="olastname" 'Fields(5)="OSTATUS" 'comment status and renumber array Fields(5)="OPROCESSED" Fields(6)="" ' keyword Fields(7)="" ' keyword Fields(8)="" ' keyword Captions(0)=getlang("langStatusOrderNum") Captions(1)=getlang("LangStatusAmount") Captions(2)=getlang("LangStatusDate") Captions(3)=getlang("LangCustFirstName") Captions(4)=getlang("LangCustLastName") 'Captions(5)=getlang("LangStatusStatus") 'comented status and renumber array Captions(5)=getlang("LangStatusProcessed") fieldcount=5 'REDUCE from 6 to five!!!
'rename "track" column If getconfig("xtrackingcustomerread")="Yes" or getconfig("xtrackingcustomerwrite")="Yes" Then fieldcount=fieldcount+1 Captions(fieldcount)="Msg." Fields(fieldcount)="TRACK" ' keyword end if
Air Armory - Airsoft http://www.AirArmory.com - shop http://sitrep.airarmory.com - news |
|
|
Sew-N-2-U
Starting Member
47 Posts |
Posted - April 17 2009 : 09:28:51
|
Thanks for the help. I will take a stab at it. Would you happen to know the name for displaying Product would be called. i.e. ReportProductColumn?? I went into shoprestoreorder.asp and found ProductAddress. I just want the name of the product there so they know which order to open. Hope this makes sense. Thanks again, Patty |
|
|
Admiral The X
VP-CART New User
USA
52 Posts |
Posted - April 17 2009 : 10:04:59
|
oops... forgot that was part of your question. i'm not at my comp right now but i'm pretty sure that the product is not par of the record set that is already open which is the order table. this means you need to make a new query to get the product. the other challange with this is there can be more than one product per order.
best way to go about this i guess would be to query the products in the order and output them to a string with line breaks between each. not hard... not simple either.
Air Armory - Airsoft http://www.AirArmory.com - shop http://sitrep.airarmory.com - news |
|
|
Sew-N-2-U
Starting Member
47 Posts |
Posted - April 17 2009 : 17:26:09
|
Oooo...I am afraid this is over my head. I requested that someone customize it and got a quote, but haven't gotten a response back on getting started. Thought I might be able to do it, but I am still a newb. Thanks for the help. If I get impatient, I might be back LOL Patty
|
|
|
|
Topic |
|