I would like to add a quantity value to a free shopping cart found at Jalbum.net in the slide skin. I have highlighted the area in red where I think the quantity needs to go. Also is the ( $label) responsible for passing the thumbnail image number to PayPal ? Is it possible to do this for a HTML form ? Passing the information in this fashion saves a lot of hand coding for each button which would be difficult for a lot of thumbnails.



Thanks in advance,
Chuck

This is a section of the code:


void PayPal(NAME,PRICE,SIZE)
{
out.println("<tr>");
out.println("<form target=\"paypal\" action=\"https://www.paypal.com/cgi-bin/webscr/\" method=\"post\">");
out.println("\t\t<input type=\"hidden\" name=\"cmd\" value=\"_cart\">");
out.println("\t\t<input type=\"hidden\" name=\"business\" value=\"PayPal Email\">");
out.println("\t\t<input type=\"hidden\" name=\"item_name\" value=\"" + SIZE + " of $label\">");
out.println("\t\t<input type=\"hidden\" name=\"item_number\" value=\"$label - " + SIZE + "\">");
out.println("\t\t<input type=\"hidden\" name=\"amount\" value=\"" + PRICE + "\">");

out.println("<td class=\"Pur\">");
out.println("\t\t" + NAME);
out.println("</td>");
out.println("<td width=\"130\" class=\"PurC\">");
out.println("<input type=\"hidden\" name=\"on0\" value=\"Paper\">");
out.println("<select name=\"os0\">");
out.println("<option value=\"Glossy\">Glossy");
out.println("<option value=\"Matte\">Matte");
out.println("</select>");
out.println("</td>");
out.println("<td width=\"60\" class=\"PurC\">");
out.println("\t\t$" + PRICE);
out.println("</td>");
out.println("<td width=\"90\" class=\"PurR\">");
out.println("\t\t<input type=\"image\" src=\"https://www.paypal.com/images/x-click-but22.gif\" border=0 name=\"submit\" alt=\"Make payments with PayPal - it's fast, free and secure!\">");
out.println("</td>");
out.println("\t\t<input type=\"hidden\" name=\"add\" value=\"1\">");
out.println("\t</form>");
out.println("</tr>");
}

%>

<BODY>

<!-- Include header.inc from image directory if present -->
<ja:include page="header.inc" />


<!-- Top Navigation Buttons -->
<CENTER>
<TABLE WIDTH="<ja:if exists="imageWidth">$imageWidth</ja:if>">
<TR>
<TD class="sNavL" width="<ja:if exists="imageWidth"><% out.print(imageWidth/3) %>"</ja:if>>
<ja:if exists="previousPage">
<a href="$previousPage"><img src="../gifs/previous.gif" border=0 alt="Previous Picture" align="absmiddle"></a>
</ja:if>
<ja:else>
&nbsp;
</ja:else>
</TD>
<TD class="sNav" width="<ja:if exists="imageWidth"><% out.print(imageWidth/3) %>"</ja:if>>
<ja:if exists="indexPage">
<a href="../$indexPage"><img src="../gifs/index.gif" border=0 alt="Thumbnails" align=center></a>
</ja:if>
<ja:else>
&nbsp;
</ja:else>
</TD>
<TD class="sNavR" width="<ja:if exists="imageWidth"><% out.print(imageWidth/3) %>"</ja:if>>
<ja:if exists="nextPage">
<a href="$nextPage"><img src="../gifs/next.gif" border=0 alt="Next Picture" align="absmiddle"></a>
</ja:if>
<ja:else>
&nbsp;
</ja:else>
</TD>
</TR>
</TABLE>
<CENTER>

<!-- SHOW PICTURE -->
<!-- Image, maybe with link to original -->
<!-- Picture size should not exceed 500x500 -->
<center>
<ja:if exists=originalPath>
<a href="$originalPath" target="_blank"><img class="image" src="$imagePath" width="$imageWidth" height="$imageHeight" border=0 Title="$label / $originalWidth x $originalHeight / <%=(int)fileSize/1000%>kbytes"></a>
</ja:if>
<ja:else>
<img class="image" src="$imagePath" width="$imageWidth" height="$imageHeight">
</ja:else>
</td>
</center>



<!-- Always display comment below image (if exists) -->
<CENTER>
<!-- Try to extract the comment from the file otherwise -->
<!-- Try to extract the comment from a single file name captions.txt -->
<DIV CLASS="comment">
$comment
<%
import se.datadosen.util.*;
File cFile = new File(imageDirectory, "captions.txt");
if (cFile.exists())
{
Map captions = IO.readMapFile(cFile);
String text = (String)captions.get(fileName);
if (text != null) out.print(text);
}
%>
</DIV>
</CENTER>
<P>

<CENTER>
<TABLE class="PayHead" style="solid" WIDTH=<%=maxImageWidth%> cellspacing=0 cellpadding=0 BORDER=1 BORDERCOLOR=BLACK>
<tr>
<td>
<table WIDTH=<%=maxImageWidth%> cellspacing=0 cellpadding=0cellspacing=0 cellpadding=0><tr>
<td bgcolor=yellow align=left>PRINT SIZE</TD>
<td bgcolor=yellow >PAPER</TD>
<td bgcolor=yellow width=60>PRICE</TD>
<td bgcolor=yellow width=90></TD>
</tr></table>
</td>
</TR>
</TABLE>
<TABLE WIDTH=<%=maxImageWidth%> cellspacing=0 cellpadding=0>
<!-- 1st Argument Defines Label for current option -->
<!-- 2nd Argument Defines Price for current option and PayPal-->
<!-- 3rd Argument Defines size for PayPal -->
<% PayPal("8x10 Print","18.00","8x10"); %>
<% PayPal("5x7 Print","10.00","5x7"); %>
<% PayPal("4x6 Print","8.00","4x6"); %>
<% PayPal("8 Wallet Prints","7.00","8 Wallets"); %>
<TR>
<td COLSPAN=4> </td>
</TR
<TR>
<td COLSPAN=4 bgcolor=black> </td>
</TR
<TR>
<td COLSPAN=4> </td>
</TR
<TR>
<!-- Add PayPal View Cart -->
<!-- Change the hidden business field to your PayPal Email address -->
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<TD CLASS="PurR" COLSPAN=4>
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="PayPal Email">
<input type="image" src="https://www.paypal.com/images/view_cart_02.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<input type="hidden" name="display" value="1">
</TD></form></TR>
</table>
</TR>
</TABLE>

</CENTER>

<p>

<!--DISPLAY BASE FILENAME -->
<b class=fileInfo>$label<br>
$title -- $currentDate</b>

</BODY>
</HTML>