Print Page | Close Window

Welcome and Logout

Printed From: ProductCart E-Commerce Solutions
Category: ProductCart
Forum Name: Customizing ProductCart
Forum Description: Exchange messages with other users that are customizing ProductCart.
URL: https://forum.productcart.com/forum_posts.asp?TID=898
Printed Date: 23-April-2025 at 7:34am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Welcome and Logout
Posted By: Jackalope
Subject: Welcome and Logout
Date Posted: 20-June-2007 at 1:05pm

I have just recently purchased PC and have begun creating a custom header. One item that I can't seem to figure out is how to impliment a session identifier that when a customer logs in, a line of text with "Welcome (customer name)" is shown somewhere in the header.

I would also like to make a logout link appear when a customer is logged in and disappear when they are logged out.

I'm no web expert, but I am fimiliar with Dreamweaver (which is what I'm using currently), so I have only a limited knowledge of .asp and html programming. I was trying to impliment some of the elements from CustPref.asp but I was only able to have the customer name appear and disappear based on their login. "Welcome" and "Logout" would remain even though I am no longer logged in as a customer.

Thanks for you help in advance. I look forward to many years of working with PC and this great forum. It's a shame that it has taken me over 1.5 years to actually purchase PC. I should have done it sooner.

Regards

-Chris




Replies:
Posted By: Jackalope
Date Posted: 20-June-2007 at 1:58pm

Searching a bit more I found this post:

http://www.earlyimpact.com/forum/forum_posts.asp?TID=17&KW=login+variable - http://www.earlyimpact.com/forum/forum_posts.asp?TID=17& KW=login+variable

I will try some of what is described therein and post my results.

Regards,

-Chris



Posted By: Jackalope
Date Posted: 20-June-2007 at 4:40pm
With a little trial and error, I figured it out. The code below displays either the current user (Guest or the customers name after they log in) with both "Login / Register" or "Your Account / Log Out" below the user. I created a class ".footernav" to tell how the text and links would display. These links as well as others in my footer share the same display properties.

<div class="footernav" id="myAccount">
     <div align="right">Welcome
        <%
        ' Display Name of customer if logged in
        if session("idCustomer")="0" or session("idCustomer")="" then%> Guest!<br>
        <% else %>
        <strong><%=session("pcStrCustName") & "!"%><br>
        <a href="custPref.asp">Your Account</a>  /</span>  <a href="CustLO.asp">Log Out</a>
        <% end if %>
        <%
        ' If the customer is not an affiliate and is not logged in
        ' show a link to the registration page.
        if session("idCustomer")="0" or session("idCustomer")="" then%>
        <a href="custPref.asp">Login</a>  /</span >  <a href="custPref.asp">Register</a>
        <% end if %>
    </div>
</div>

Thanks to the forum members for previously helping out others with the same issue.

Regards,
-Chris


Posted By: thegardenbath
Date Posted: 28-June-2008 at 12:17am
I just wanted to say thank you!  I've added this to my shop, which is still in development, and it's a really nice personal touch for the customer. 

Thanks again!


Posted By: macleather
Date Posted: 06-August-2008 at 6:53pm
Hi Jackalope,

I was wondering where you inserted the code described above? Was it header.asp?

Thanks,

Alan



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net