Cueless person asking a question. Hopefully it will be an easy answer for someone.
I would like to use several order anywhere buttons on one .php page (.php is purely for there to provide password protection on the page).
There are "quantity" boxes for each item. What I would like to do is to have say 15 items on one page with only one add to cart button at the bottom. However, when there is "0" placed in the quantity amount, when 'add to cart' is pressed, it addes them to the cart but with the value of 0. Ideally, I would like them not to be added to the cart.
Is there anyway I can place a piece of code onto the page that interupts the sending process to stop a blank item being added to the cart. Here are the code snippets.
To add the item with the quantity box,
- Code: Select all
<input type="hidden" name="dbname" value="products" />
<input type="hidden" name="function" value="add" />
<input type="hidden" name="itemnum" value="2">
<input type="text" size="1" name="2:qnty" maxlength="2" value="0"><br /><span class="dealerbody">Quantity</span>
To submit the form.
- Code: Select all
<input type=image src="http://store/shopsite-images/en-US/buttons/sleek/sleek-add.gif" width="83" height="20" vspace="7" hspace="0" border="0" align="bottom" alt="Add to Cart" name="Add to Cart">
Is there a piece of code that will make the process ignore if quantity is declared as "0"..?
Thank you for your time.