Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 Suggestions for future release
 Include Session data in templates
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

deant
Starting Member

Australia
5 Posts

Posted - June 23 2008 :  13:17:55  Show Profile  Reply with Quote
Templates are very useful for customizing VPASP's HTML pages and emails, but the format of the [...] tags used to insert data into the template is rather limited.

In particular, if you've integrated VPASP into a larger website, you may need to include information into the templates that comes from outside of VPASP.

One very easy way to do this is to put the required data into ASP session variables.

Then in shopfileio.asp, add the following line to the bottom of the ProcessKeyword subroutine, just before "end sub":

if Left(keyword,8)="SESSION(" and Right(keyword,1)=")" then value=Session(Mid(keyword,9,Len(keyword)-9)) : rc=0


This lets you include in templates tags like

[session(my_session_variable)]

which would display the contents of the ASP session variable

Session("my_session_variable")


If you think people might find this useful, you could include it in a future release!

seeker1
VP-CART New User

Australia
114 Posts

Posted - June 27 2008 :  21:31:37  Show Profile  Visit seeker1's Homepage  Reply with Quote
If you are interested in this function, I can built it for you.


Howard Kadetz
www.hkprog.com
[email protected]
VP-ASP customizations and software enhancements
Go to Top of Page

deant
Starting Member

Australia
5 Posts

Posted - August 06 2008 :  07:05:43  Show Profile  Reply with Quote
Uh, Howard?

I *did* build it. It requires only a one-line addition to the ProcessKeyword sub in shopfileio.asp to implement, AS GIVEN IN MY INITIAL POST!
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