This topic is locked
[SOLVED]

 Adding Session(UserId)

5/28/2012 11:25:07 AM
ASPRunnerPro General questions
I
ianlyonthomas author

Hi,
I hope someone can point me in the right direction.
I have added some code via the HTML view within an Add page.

The code displays a PayPal button and takes user to paypal. It all works fine except that I need to add the session(UserId) to the line: name=item_name value='June_event'- I would appreciate any help.
Thanks
Code as per below:
<FORM method=post name=_xclick

action=https://www.paypal.com/cgi-bin/webscr

target=paypal><INPUT name=cmd value=_cart type=hidden> <INPUT

name=business value=xx@xxxxxxxxxx.co.uk

type=hidden> <INPUT name=currency_code value=GBP type=hidden>

<INPUT

name=item_name value='June_event' <<<<need to add userId here

type=hidden test

PayPal> <INPUT

name=amount value=45.00 type=hidden>

<TABLE>

<TBODY>

<TR>

<TD><INPUT border=0 name=submit alt=PayPal

src="https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=19642&image=1&table=forumtopics";

type=image></TD></TR></TBODY></TABLE><INPUT name=add value=1

type=hidden> </FORM>

Sergey Kornilov admin 6/3/2012

This is a two-step process

  1. Add a new template variable to your HTML code i.e. {$userid}
  2. In BeforeProcess event of the page in question use the following code:

xt.assign "userid", Session("UserID")
I
ianlyonthomas author 6/6/2012

Thanks Sergey