Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2002
    Location
    Holland
    Posts
    16

    Cool Unanswered: Session & Shopping Cart

    I have created a webshop, but the problem is that people first have to register before they can fill their cart. How can I change this? So when someone comes from the products page they can fill up the shopping cart and after having shopped they should have to register. Now it is the wrong way round


    Here's the code:


    <!-- #INCLUDE file="storefuncs.asp" -->

    <%
    ' Get Product ID
    productID = TRIM( Request( "pid" ) )

    ' Get Login Information
    username = TRIM( Request( "username" ) )
    password = TRIM( Request( "password" ) )
    register = TRIM( Request( "register" ) )
    error = TRIM( Request( "error" ) )

    'Open database Connnection
    %>
    <!-- #INCLUDE FILE="connection.asp" -->
    <%


    ' Check For New Registration
    IF register <> "" AND error = "" THEN
    addUser
    END IF

    ' Get User ID
    userID = checkpassword( username, password, Con )
    %>
    <html>
    <head>
    <title> X</title>


    <!-- *** IMPORTANT STYLESHEET SECTION - Change the border classes and text colours *** -->
    <style>
    <!--

    .itemBorder { border: 3px ; color: #FFFFFF }
    .itemText { text-decoration: none; color: #FFFFFF; font: 10px Arial, Helvetica }

    .crazyBorder { border: 2px outset #663399 }
    .crazyText { text-decoration: none; color: #FFCC99; font: Bold 10px Arial, Helvetica }

    -->
    </style>


    <link rel="stylesheet" href="style.css" type="text/css"></head>
    <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" link="#FFFFFF" vlink="#CCCCCC" alink="#FFFFFF">
    <table border="0" cellpadding="0" width="100%" cellspacing="0" align="center">
    <tr>
    <td align="left"> <img src="images/diversen/logo.gif" width="250" height="73"></td>
    <td></td>
    <td> X </td>
    </tr>
    <tr>
    <td bgcolor="#00CC00" height="25" class="bodytekst">
    <div align="center"><a href="default.asp">Home</a></div>
    </td>
    <td bgcolor="#00CC00" height="25" class="bodytekst">
    <div align="center"><a href="cart.asp">Winkelwagen</a></div>
    </td>
    <td bgcolor="#00CC00" height="25" class="bodytekst">
    <div align="center"><a href="contact.asp">Contact</a></div>
    </td>
    </tr>
    <tr>
    <td></td>
    <td>
    <%

    IF userID > 0 THEN
    %>
    <!-- #INCLUDE file="addCart.asp" -->
    <% ELSE %>
    <!-- #INCLUDE file="register.asp" -->
    <%
    END IF
    %>

    </td>
    <td></td>
    </tr>


    </table>
    </body>

  2. #2
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    basically uou need to change/move this...
    Code:
    IF userID > 0 THEN
      %>
      <!-- #INCLUDE file="addCart.asp" -->
    <% ELSE %>
      <!-- #INCLUDE file="register.asp" -->
      <%
    END IF
    %>
    you want to remove it in this page but put it in to your checkout page some something like
    Code:
    IF userID > 0 THEN
      %>
      <!-- #INCLUDE file="gotoCheckOut.asp" -->
    <% ELSE %>
      <!-- #INCLUDE file="register.asp" -->
      <%
    END IF
    %>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •