Print Page | Close Window

Customer Login/ Affiliate Login code block

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=1637
Printed Date: 22-April-2025 at 6:22pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Customer Login/ Affiliate Login code block
Posted By: inetbizo
Subject: Customer Login/ Affiliate Login code block
Date Posted: 19-May-2008 at 5:55pm

I'm using some stock code here to produce the login box. The customer login shows up just fine, but the Affiliate Login/Register does not.

<!-- START Logins -->
    <div id="pcCustomerLogin">
     <h3>Customer Account:</h3>
      <ul>
        <%
        ' If the customer is not logged in
        ' show a link to the registration page.
        if session("idCustomer")="0" or session("idCustomer")="" then
       %>
        <li><a href="custPref.asp">Register/Login</a></li>
<% else
        ' Otherwise show the customer service links %>
        <li><a href="/store/pc/custPref.asp">Account Home</a></li>
        <li><a href="/store/pc/CustviewPast.asp">Previous Orders</a></li>
        <li><a href="/store/pc/login.asp?lmode=1">Billing Address</a></li>
        <li><a href="/store/pc/CustSAmanage.asp">Shipping Addresses</a></li>
       <%
        ' If the Wish List feature is active, show a link to it
         if (scWL="-1") or ((scBTO=1) and (iBTOQuote=1)) then
       %>
         <li><a href="/store/pc/Custquotesview.asp">Saved Products</a></li>
        <% end if %>
       <li><a href="/store/pc/CustLO.asp">Log Out</a></li>
      <% end if %>
      </ul>
     </div>

     <%
     'START Affiliate login if there are any affiliates
     sdquery="SELECT idAffiliate FROM affiliates"
     set rs=conlayout.execute(sdquery)
     iRecordCount = 0
     Do While not rs.EOF
      iRecordCount = iRecordCount + 1
      rs.MoveNext
     Loop
     if iRecordCount > 1 then
     %>
     <div id="pcAffiliateLogin">
      <h3>Affiliate Account:</h3>
       <ul>
        <% if session("pc_IDAffiliate")="0" or session("pc_IDAffiliate")="" then %>
         <li><a href="AffiliateLogin.asp">Register/Login</a></li>
<% else %>
         <li><a href="AffiliateMain.asp">Account Home</a></li>
         <li><a href="Affgenlinks.asp">Generate Links</a></li>
         <li><a href="pcmodAffa.asp">Account Details</a></li>
         <li><a href="AffCommissions.asp">View Commissions</a></li>
         <li><a href="AffLO.asp">Log Out</a></li>
         <%' End affiliate links
          end if %>
       </ul>
     </div>
     <% end if %>



-------------
Current Project http://canvasusa.com - http://www.canvasusa.com



Replies:
Posted By: Hamish
Date Posted: 19-May-2008 at 6:08pm
Hi,
   My immediate thought is that - as you KNOW you have affiliates some of this code is unnecessary.

You should be able to drop :
<%
     'START Affiliate login if there are any affiliates
     sdquery="SELECT idAffiliate FROM affiliates"
     set rs=conlayout.execute(sdquery)
     iRecordCount = 0
     Do While not rs.EOF
      iRecordCount = iRecordCount + 1
      rs.MoveNext
     Loop
     if iRecordCount > 1 then
     %>
and the final
     <% end if %>

It shouldn't make any difference really, although removing loops is always good from an efficiency point of view Smile
Of course - that doesn't explain why you not getting the affiliate login  showing up - have you got any affiliates set up on your store? 




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