Find Jobs
Hire Freelancers

ASP website fixing

$15-20 USD

Completed
Posted about 14 years ago

$15-20 USD

Paid on delivery
Hi All I have been given a simple ecommerce website based on asp and ms access database. and need to make some? minor changes? to it. Basically if you look at [[login to view URL]][1] and goto the menu on the left to any item. I just need some code adjusted so that if stock is 0 then visitor should not be able to add item to basket. And if visitor adds quantity more than stock then should get message. It is kind of working but not quite well. I believe this to be a very simple and straight forward fix for anyone who knows what they are doing. Thanks ## Deliverables Here is code of the page. <!-- #INCLUDE FILE="[login to view URL]" --> <% ' Define variables dim recordsonpage, requestrecords, offset, allrecords, hiddenrecords, showrecords, lastrecord, recordcounter, pagelist, pagelistcounter maingroup = Replace([login to view URL]("maingroup")," ' "," '' ") secondgroup = Replace([login to view URL]("secondgroup")," ' "," '' ") Set conn = [login to view URL]("[login to view URL]") [login to view URL] "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & [login to view URL](midicart_db_name) set rs=[login to view URL]("SELECT * FROM products where maingroup = '" & maingroup & "' AND secondgroup = '" & secondgroup & "' ORDER BY code_no") %> <html> <head> <title><%=[login to view URL]("maingroup")%> / <%=[login to view URL]("secondgroup")%></title> <link rel="stylesheet" HREF="[login to view URL]"> <script type="text/javascript" src="[login to view URL]"><!-- overLIB (c) Erik Bosrup --></script> <script language="Javascript"> <!--? // --> if (top == self) [login to view URL] = "[login to view URL]"; </script> <SCRIPT language="JavaScript"><!-- //script hider// end script hiding --> function form_validator(itemsform) { ? if([login to view URL]<% =RS("code_no") %>[login to view URL] > <% = RS("stock")%> ) ? ? { ? ? alert("<%=txt_over_stock%>"); ? ? [login to view URL]<% =RS("code_no") %>[login to view URL] = "0"; ? ? [login to view URL]<% =RS("code_no") %>[login to view URL] = "1"; ? ? return (false); ? } ? ? return (false); } </SCRIPT> </HEAD> <BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#660101" VLINK="#660101" ALINK="#F70404"> <div id="overDiv" style="Z-INDEX:1000; VISIBILITY:hidden; POSITION:absolute"></div> <FORM NAME="itemsform"> <CENTER> <font size="1" face="Verdana, Arial, Helvetica, sans-serif"> <%=[login to view URL]("maingroup")%> / <%=[login to view URL]("secondgroup")%> </FONT> <HR WIDTH=90% size=1 COLOR="#000000"> <font size="2" face="verdana, Arial, Helvetica, sans-serif"><p align="left" class="style8">Our items are made to the highest quality and standard. Please select the item you like from below and click the buy button. You will not be asked for any payment details yet. Payment details will be asked for once you have been directed to the secure paypal website.</p></FONT> <p> <p> <table cellpadding="2" cellspacing="1" border="0"> <TR> <TD BGCOLOR="#F1FA83">&nbsp;</TD> <TD BGCOLOR="#F1FA83"><B><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><%=txt_code_no%></font></B></TD> <TD BGCOLOR="#F1FA83"><B><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><%=txt_item%></font></B></TD> <TD BGCOLOR="#F1FA83"><B><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><%=txt_stock%></font></B></TD> <TD BGCOLOR="#F1FA83"><B><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><%=txt_price%></font></B></TD> <TD BGCOLOR="#F1FA83"><B><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><%=txt_order%></font></B></TD> </TR> <% iCount = 0 Do While Not [login to view URL] 'start the count If Eval(iCount\2 = iCount/2) Then 'determine if the number is odd or even %> <tr bgcolor=#D9D900> <TD bgcolor="#D9D900"><a href="[login to view URL]<% =RS("code_no") %>" TARGET="main"><IMG SRC="images/<% = rs("image")%>" BORDER="0" WIDTH="<%=thumbs_width%>" HEIGHT="<%=thumbs_height%>" onMouseOver="return overlib('<img src=\'images/<% = rs("image")%>\'>');" onMouseOut="return nd();"></A></TD> <TD><font size="1" face="Verdana, Arial, Helvetica, sans-serif"> <a href="[login to view URL]<% =RS("code_no") %>" TARGET="main"><% =RS("code_no") %></A></FONT></TD> <TD><font size="1" face="Verdana, Arial, Helvetica, sans-serif"> <a href="[login to view URL]<% =RS("code_no") %>" TARGET="main"><% =RS("item") %></A></FONT></TD> <TD align=right><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><% = RS("stock")%></FONT></TD> <TD align=right><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><% = RS("price")%></FONT></TD> <TD><INPUT TYPE="value" NAME="id<% =RS("code_no") %>quant" VALUE="0" SIZE=3 class="field"> <INPUT TYPE="button" NAME="<% =RS("code_no") %>add" VALUE="<%=txt_buy_now%>" class="button" onClick="form_validator(itemsform); [login to view URL]('<% =RS("item") %>','<% =RS("price") %>', [login to view URL]<% =RS("code_no") %>[login to view URL], '<% =RS("code_no") %>', '<% =RS("shipping") %>')"></TD></TR> </TD></TR> ? <% Else %> <tr bgcolor=#F1FA83> <TD><a href="[login to view URL]<% =RS("code_no") %>" TARGET="main"><IMG SRC="images/<% = rs("image")%>" BORDER="0" WIDTH="<%=thumbs_width%>" HEIGHT="<%=thumbs_height%>" onMouseOver="return overlib('<img src=\'images/<% = rs("image")%>\'>');" onMouseOut="return nd();"></A></TD> <TD><font size="1" face="Verdana, Arial, Helvetica, sans-serif"> <a href="[login to view URL]<% =RS("code_no") %>" TARGET="main"><% =RS("code_no") %></A></FONT></TD> <TD><font size="1" face="Verdana, Arial, Helvetica, sans-serif"> <a href="[login to view URL]<% =RS("code_no") %>" TARGET="main"><% =RS("item") %></A></FONT></TD> <TD align=right><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><% = RS("stock")%></FONT></TD> <TD align=right><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><% = RS("price")%></FONT></TD> <!-- <TD><INPUT TYPE="value" NAME="id<% =RS("code_no") %>quant" VALUE="1" SIZE=3 class="field"> <INPUT TYPE="button" NAME="<% =RS("code_no") %>add" VALUE="<%=txt_buy_now%>" class="button" onClick="form_validator(itemsform); [login to view URL]('<% =RS("item") %>','<% =RS("price") %>', [login to view URL]<% =RS("code_no") %>[login to view URL], '<% =RS("code_no") %>', '<% =RS("shipping") %>')">? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? COMMENTED FOR STOCK VALIDATION --> <TD><INPUT TYPE="value" NAME="id<% =RS("code_no") %>quant" VALUE="0" SIZE=3 class="field"> <INPUT TYPE="button" NAME="<% =RS("code_no") %>add" VALUE="<%=txt_buy_now%>" class="button" onClick="form_validator(itemsform); [login to view URL]('<% =RS("item") %>','<% =RS("price") %>', [login to view URL]<% =RS("code_no") %>[login to view URL], '<% =RS("code_no") %>', '<% =RS("shipping") %>')"></TD></TR> </TD></TR> <% ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? End If ? ? ? ? ? ? ? ? ? ? ? iCount = iCount +1? 'increment the counter ? ? ? ? ? ? ? ? ? ? ? [login to view URL] ? ? ? ? ? ? ? ? ? ? ? Loop ? ? ? ? ? ? ? ? ? ? ? [login to view URL] ? ? ? ? ? ? ? ? ? ? ? Set conn = nothing ? %> </table> <HR WIDTH=90% size=1 COLOR="#000000"> <p align="center"><img src="productImages/[login to view URL]" width="520" height="60"></p> <font size="-2" face="Verdana, Arial, Helvetica, sans-serif"> <%=txt_click_details %></FONT><P> <font size="-2" face="Verdana, Arial, Helvetica, sans-serif"><b> | <a href="[login to view URL]"><%=txt_view_cart%></a> | <a href="[login to view URL]"><%=txt_checkout %></a> |</b></font> </CENTER> </FORM> </body> </html>
Project ID: 3294623

About the project

6 proposals
Remote project
Active 14 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
See private message.
$17 USD in 10 days
4.9 (78 reviews)
6.1
6.1
6 freelancers are bidding on average $15 USD for this job
User Avatar
See private message.
$17 USD in 10 days
4.7 (267 reviews)
6.4
6.4
User Avatar
See private message.
$17 USD in 10 days
4.8 (54 reviews)
5.2
5.2
User Avatar
See private message.
$12.75 USD in 10 days
4.9 (20 reviews)
4.6
4.6
User Avatar
See private message.
$17 USD in 10 days
5.0 (10 reviews)
2.4
2.4
User Avatar
See private message.
$10.20 USD in 10 days
0.0 (1 review)
0.0
0.0

About the client

Flag of UNITED KINGDOM
United Kingdom
0.0
0
Member since Mar 26, 2010

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.