ProductCart E-Commerce Solutions Homepage
Forum Home Forum Home > ProductCart > Using ProductCart
  New Posts New Posts RSS Feed - CatSalesReport.asp not showing customer name
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CatSalesReport.asp not showing customer name

 Post Reply Post Reply
Author
Message
Brett View Drop Down
Groupie
Groupie
Avatar

Joined: 22-April-2008
Location: Phoenix, AZ
Status: Offline
Points: 89
Post Options Post Options   Thanks (0) Thanks(0)   Quote Brett Quote  Post ReplyReply Direct Link To This Post Topic: CatSalesReport.asp not showing customer name
    Posted: 31-October-2010 at 9:01pm
The report does not show customer name. Verified on ProductCart demo store.

To fix, edit the query on line 145 (v4.1 PPE):
query="SELECT DISTINCT orders.idorder,orders.idcustomer,orders.total,orders.shipmentDetails,orders.paymentDetails,orders.taxAmount,orders.discountDetails,orders.orderDate,orders.processDate,orders.shipDate,customers.name,customers.lastName FROM ((ProductsOrdered INNER JOIN Orders ON ProductsOrdered.idOrder=Orders.idOrder) INNER JOIN customers on customers.idcustomer=orders.idcustomer) INNER JOIN Categories_Products ON ProductsOrdered.idProduct=Categories_Products.idProduct WHERE Categories_Products.IDCategory=" & pIDCategory & " AND ((orders.orderStatus>2 AND orders.orderStatus<5) OR (orders.orderStatus>6 AND orders.orderStatus<9) OR (orders.orderStatus=10 OR orders.orderStatus=12)) " & TempSQL1 & TempSQL2 & TempSpecial & " ORDER BY " & tmpD & " DESC;"

This stuff was added:

,customers.name,customers.lastName FROM ((ProductsOrdered INNER JOIN Orders ON ProductsOrdered.idOrder=Orders.idOrder) INNER JOIN customers on customers.idcustomer=orders.idcustomer)

So it will pull customers.name and customers.lastName from the database.


Then on line 189:

do until rs.EOF
     pc_idorder=rs("idorder")
     pc_idcustomer=rs("idcustomer")
     pc_orderDate=rs("orderDate")
     custName=rs("name") & " " & rs("lastName")

This grabs the database query info and puts it into a variable custName


Then on line 259:

<td nowrap><a href="viewCustOrders.asp?idcustomer=<%=pc_idcustomer%>" target="_blank" title="View all orders by this customer"><%=custName%></a></td>

This shows the previously defined custName variable.

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 6.313 seconds.