ProductCart E-Commerce Solutions Homepage
Forum Home Forum Home > ProductCart > Customizing ProductCart
  New Posts New Posts RSS Feed - Customer Login/ Affiliate Login code block
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Customer Login/ Affiliate Login code block

 Post Reply Post Reply
Author
Message
inetbizo View Drop Down
Groupie
Groupie
Avatar

Joined: 10-April-2008
Location: Destin, FL, USA
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote inetbizo Quote  Post ReplyReply Direct Link To This Post Topic: Customer Login/ Affiliate Login code block
    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://www.canvasusa.com
Back to Top
Hamish View Drop Down
Admin Group
Admin Group


Joined: 12-October-2006
Location: United Kingdom
Status: Offline
Points: 56
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hamish Quote  Post ReplyReply Direct Link To This Post 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? 

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.047 seconds.