Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 Customization
 shopmailformat.asp - adding in product code
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

jdkerr
Starting Member

Canada
43 Posts

Posted - November 16 2004 :  12:37:50  Show Profile  Visit jdkerr's Homepage  Reply with Quote
I would like to ammend the code in shopmailformat.asp to include the part number field when the order is emailed to the client for each item in the order. Unfortunately, I am not sure how to retrieve the "ccode" field to include it in the following output:

Itemname=RemoveHtmlmail(itemname, CR)
Body = Body & "----------------------------------------------------------" & CR
Body = Body & "" & itemname & CR
Body = Body & " " & getlang("langProductQuantity") & ": " & RSItems("numitems")
Body = Body & " " & getlang("langProductPrice") & ": " & shopformatcurrency(RSItems("unitprice"),ydecimalpoint) & CR
Body = Body & "----------------------------------------------------------" & CR
RSItems.MoveNext

Any hints on how to include the "ccode" field in there??

Thanks,

John

eabrams
VP-CART New User

USA
72 Posts

Posted - November 16 2004 :  13:32:14  Show Profile  Visit eabrams's Homepage  Reply with Quote
After looking at the code you will need to set up a query on products table and pull the ccode based on catalogID for each product.

Also see post http://www.vpasp.com/virtprog/vpaspforum/topic.asp?TOPIC_ID=2857

Later in the day:
I decided to dig into this. Since my cart is using templates I edited the file shopfileio.asp and change the query that selects the product.

'new Query to select ccode
isql="select products.ccode, * from oitems INNER JOIN products ON oitems.catalogid = products.catalogid where oitems.orderid="

'Old query
'isql="select * from oitems where orderid="

......
'Edit template body

Body = Body & CR & Itemname & CR & "Product Code: " & RSItems("ccode") & CR
Body = Body & getlang("LangProductQuantity") & ": " & RSItems("numitems") & CR


http://www.spws.net

Edited by - eabrams on November 16 2004 13:40:29

Edited by - eabrams on November 16 2004 14:54:09
Go to Top of Page

jdkerr
Starting Member

Canada
43 Posts

Posted - November 16 2004 :  18:02:13  Show Profile  Visit jdkerr's Homepage  Reply with Quote
Thanks for the hints and the ideas. I referred to the article you referenced that that had the solution I needed.

I ammended the xcartfileds value from: cname,cdescription
and changed it to: ccode,cname,cdescription

And this gave the exact results I was looking for and it now works great.

Appreciate it very much.

John

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