Signup · Login
Stardeveloper.com  
Home · Tutorials · Forums · Web Hosting Plans · Faisal Khan's Blog · Contact
Forums : ASP : ASP 3.0 : modifying my asp script Signup · Login
Author Thread
modifying my asp script
Posted in tutorial: Beginning E-Commerce : Object Oriented Programming
·  acs
User
Joined: 17 Dec 2005
Total Posts: 1
modifying my asp script
Posted: 17 Dec 2005
I have a shopping cart that a friend gave me some time ago and I never used it. I have modified it to suit my needs but it does not have options for colors and sizes and I want to modify the code to add this. Can some one help me do this. It's structure is a home page that list the categories, next page is a products by category, next page actually list the products singularly, giving a id, pic, drescription, price. I think that it is the products page I want to edit but I don't know where to begin. This is the code from the products page. I have added a field in the database to include the colors and sizes. They are both drop down boxes listing all of the colors and sizes to choose from. productColor and productsize

<%
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open ConString

Set rsProdInfo = Conn.Execute("SELECT * FROM " & _
"products where productID="&intProdID)
if rsProdInfo.EOF then
Response.Write "Product Number " & intProdID & _
" does not exist."
else
strName = rsProdInfo("productName")
strDesc = rsProdInfo("productDesc")
strImage = rsProdInfo("productImg")
intPrice = rsProdInfo("productPrice")
%>
<p><font face="Verdana" size="4"><%= strName %></font></p>
<table border="0" cellspacing="0" cellpadding="2">
<tr>
<td><img src="<%= strImage %>" align="left">
<td><font face="Verdana" size="1"><%= strDesc %></font></td>
<tr>
</table>

<form action="addToCart.asp" method="post" id="form1" name="form1">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td align="center">
<font face="Verdana" size="2"><b>
<input type="hidden" name="intProdID" value="<%= intProdID %>">
Add
<input type="text" size="3" name="intQuant" value="1" onChange="HandleError(this)">
to my order.</b> 
<input type="submit" value="Add to Cart" id="submit1" name="submit1">
<br><br><br><br>
<a href="reviewOrder.asp" OnMouseOver="test3.src='images/btnDown_ck.gif'" OnMouseOut="test3.src='images/btnUp_ck.gif'"><img SRC="images/btnUp_ck.gif" alt="Review Order and/or Check Out" BORDER="0" NAME="test3" WIDTH="264" HEIGHT="20">
</font></td>
<td align="center" valign="middle" nowrap><font face="Verdana" size="4">Price: $<%= formatNumber(intPrice, 2) %></font></td>
</tr>
</table>
</form>

<%
end if
rsProdInfo.Close
set rsProdInfo = Nothing

Conn.Close
set Conn = Nothing
%>

Users Who Have Visited This Thread In Last 24 Hours
4 Visitors

Login
UserName Or Email Address:       Password:       Auto-Login:    
· Create New User Account
· Send Forgotten Password by Email
 
© 1999 - 2009 Stardeveloper.com, All Rights Reserved.