VP-ASP :: Shopping Cart Software

Shopping Cart Software Solutions for anywhere in the World

US/Canada(Toll Free): +1 888 587 2278
Europe/UK: +44 (020) 7193 9408
Australia/New Zealand: +61 3 9016 4497

VP-ASP Shopping Cart Customer Forum

Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VPCart Forum
 Customization
 How to pull record from DB and display it as text?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

snayar
Starting Member

USA
10 Posts

Posted - March 26 2009 :  20:17:45  Show Profile  Reply with Quote
Hello,

I would like to know the easiest way of pulling one record from the SQL database as a variable (say, for example the customer first name) and customize the shopcustadmin.asp to personalize it with the customer's name?

Any ideas?

Thanks in advance!!!

carfin
VP-ASP Expert

United Kingdom
948 Posts

Posted - March 27 2009 :  06:19:02  Show Profile  Reply with Quote
Probably best to use the Stored session variables eg

<%=Getsess("lastname")%>

Then it will only display if the customer is logged in

Regards,

Carrol
www.deanston-electrical.co.uk
Go to Top of Page

snayar
Starting Member

USA
10 Posts

Posted - March 27 2009 :  13:04:18  Show Profile  Reply with Quote
Thank you Carrol!

That worked wonderfully... I totally forgot about session variables

But since I'm using this on an asp page I ended up tweaking your code as:

Response.Write Session("FirstName") & ", "

Thank you again Carrol!!!

Sergio
Go to Top of Page

snayar
Starting Member

USA
10 Posts

Posted - March 27 2009 :  13:21:36  Show Profile  Reply with Quote
Ooops!...

Even though it worked flawlessly to pull the firstname variable of the logged in person, I can't get the session variable of a custom field I added myself to the database (design)...

I modified the shop$db.asp to try to accomplish this by following the 'firstname' code, but I suppose there's something else missing because it displays nothing yet.

Any pointers?

EDIT: Never mind, its working now!

I just needed to end the session and log on again in order to see the change...


Cheers!
Sergio

Edited by - snayar on March 27 2009 14:01:47
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000