If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Session & Shopping Cart

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-04-04, 15:13
EvE EvE is offline
Registered User
 
Join Date: Aug 2002
Location: Holland
Posts: 16
Cool 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>
Reply With Quote
  #2 (permalink)  
Old 04-04-04, 19:54
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
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
%>
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On