Screen: ShopSite > Merchandising > Custom Templates > Customer Registration Links

Customer Registration Links

When you enable Customer Registration, if you are using default templates, Customer Registration links will appear on the shopping cart screen, allowing a customer to sign-in, register, sign-out, or change their settings.

Custom Template Tags

You can include customer registration links on custom templates by including one of the following custom template tags, depending on what template you are using:

[-- RegistrationSignIn --]
This tag is for use on static store pages, such as product listing pages, more info pages, and gift certificate order pages. It can also be used on Search results pages.
[-- SC_Registration --]
Use this tag in your Shopping Cart templates

Custom Sign-in Script

The custom template tags above do not allow you to configure the appearance of the sign-in links. If you want to change the appearance of the links, you will need to include your own custom JavaScript to generate the links. The sample script below creates links just like the default ones. You can copy this script and modify it to suit your needs.

<SCRIPT LANGUAGE="javascript">
function DisplayLogName(name) {
  var cookies=document.cookie;
  var start = cookies.indexOf(name + "=");
  var name = "";
  var start1;
  var end1;
  var tmp;
  var signed_in = -1;

  if (start != -1) {
    start = cookies.indexOf("=", start) +1;
    var end = cookies.indexOf("|", start);
    if (end != -1) {
      signed_in = cookies.indexOf("|yes", start);
      name = unescape(cookies.substring(start,end-1));
      document.write("<b>" + name + "</b>");
      if (signed_in != -1) {
        document.write("<br>");
        document.write("•<a href=\"[-- SHOPPING_CART_URL BASE --]/order.cgi?func=3&storeid=[-- STORE.ID --]&html_reg=html\">View/Edit Account</a>");
        document.write("<br>");
        document.write("• <a href=\"[-- SHOPPING_CART_URL BASE --]/order.cgi?func=4&storeid=[-- STORE.ID --]&html_reg=html\">Sign Out</a>");
        document.write("<br>");
      }
      else
      {
        document.write(" - You are no longer signed in<br>");
      }
    }
  }
  if (signed_in == -1) {
    document.write("• New Customer? <a href=\"[-- SHOPPING_CART_URL BASE --]/order.cgi?func=1&storeid=[-- STORE.ID --]&html_reg=html\">Click here to Register</a>");
    document.write("<br>");
    document.write("• Returning Customer? <a href=\"[-- SHOPPING_CART_URL BASE --]/order.cgi?func=2&storeid=[-- STORE.ID --]&html_reg=html\">Click here to Sign In</a>");
    document.write("<br>");
  }
}
DisplayLogName("[-- RegCookieName --]");
</SCRIPT>

Note that in all of the links, there are three Custom Template Tags, so if you decide to use an [-- INCLUDE --] tag to add your script, make sure to include the PROCESS directive.


ShopSite Help and Resource Center
Last updated: September 17, 2004
Give Feedback

© 2007, ShopSite, Inc.
ShopSite Shopping Cart Software