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>