Print Page | Close Window

Login and logout information

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=1871
Printed Date: 13-July-2025 at 12:25am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Login and logout information
Posted By: john123
Subject: Login and logout information
Date Posted: 03-August-2008 at 8:18am
Hi,
 
This is probably a stupid question but I think I will ask it anyway...
 
I want to add this customer welcome and logout information on pages.  I found the information here:
http://www.earlyimpact.com/forum/forum_posts.asp?TID=898 - http://www.earlyimpact.com/forum/forum_posts.asp?TID=898
 
<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>
I have integrated PC with my exisitng HTML website.  Is there any way of having this information consistent on my site or does this code only work in the database or shopping cart?
 
John
 
 



Replies:
Posted By: Hamish
Date Posted: 03-August-2008 at 8:36am
Hi John,
   None of that code accesses the DB, it's just reading session variables, BUT session variables are server side only and the code is VBScript, so it won't work within an HTML page.



-------------
Editing ProductCart Code?

See http://wiki.earlyimpact.com/developers/editcode" rel="nofollow - WIKI Guidelines for Editing ProductCart's ASP Source Code



Posted By: john123
Date Posted: 03-August-2008 at 1:41pm
Hi Hamish,
 
It does work when I add the code in my header.asp.  I also want to add it to my other pages that are outside of the shopping cart.  Is there anything I can do?
 
Does this make sense?
 
John


Posted By: Hamish
Date Posted: 03-August-2008 at 2:51pm
Hi John,
   When I say HTML pages I mean classic HTML pages (ending in .HTML or .HTM).
ASP pages such as those in Product Cart  will work OK as they will process the VBscript on the server.

I think a possible solution to this would be to use some AJAX code, although it would involve some custom coding & is not something I'm very familiar with.  If you want to have a go at this try googling for "classic asp ajax session" or some similar search - Or ask the Product Cart developer community for a custom solution.


-------------
Editing ProductCart Code?

See http://wiki.earlyimpact.com/developers/editcode" rel="nofollow - WIKI Guidelines for Editing ProductCart's ASP Source Code



Posted By: john123
Date Posted: 04-August-2008 at 3:25pm
Hi Hamish,
 
Thanks for the info.  Another question...
 
After a customer is in the shopping cart, is there a way to display account menu information such as the logout or view previous orders?
 
john
 


Posted By: Hamish
Date Posted: 04-August-2008 at 4:00pm
Hi John,
    Do you mean like is shown on page pc/CustPref.asp ?

It has links to :-

    *  Start Shopping
    * View Previous Orders
    * Modify Personal Information
    * Manage Delivery Addresses
    * View Saved Products
    * Contact Us
    * Logout





-------------
Editing ProductCart Code?

See http://wiki.earlyimpact.com/developers/editcode" rel="nofollow - WIKI Guidelines for Editing ProductCart's ASP Source Code



Posted By: john123
Date Posted: 04-August-2008 at 4:05pm
Hi Hamish,
 
Yes.  I just realized that from within the shopping cart pages, there is no link for the menu.
 
John
 



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