Quote:
Could you go into more detail on how you did this?
Maybe an example?
|
Well, we didn't actually do it on our own. A little help from Gonzalo and Jimmy got us started and then we modified as needed. I will post an example but basically you have to create a form with most of the elements set as hidden. These elements list the product(s) and quantities you want included when 'add to cart' is clicked. Without further ado:
Code:
<form ENCTYPE="multipart/form-data" method=post action=add_cart.asp name="add">
<td>
<input type=hidden name="item_id" value="1">
<input type=hidden size="2" name="qty-1" value=1>
<input type=hidden name="item_id" value="2">
<input type=hidden size="2" name="qty-2" value=1>
<input type=hidden name="item_id" value="3">
<input type=hidden size="2" name="qty-3" value=1>
<input type=hidden name="item_id" value="4">
<input type=hidden size="2" name="qty-4" value=1>
<input type="submit" name="Add" value="Add to Cart" class="btn">
</td>
</form>
So this would add one of each of product with an item_id of 1 through 4. For the sake of clarity here is the same thing, but adding 2 of each to the cart:
Code:
<form ENCTYPE="multipart/form-data" method=post action=add_cart.asp name="add">
<td>
<input type=hidden name="item_id" value="1">
<input type=hidden size="2" name="qty-1" value=2>
<input type=hidden name="item_id" value="2">
<input type=hidden size="2" name="qty-2" value=2>
<input type=hidden name="item_id" value="3">
<input type=hidden size="2" name="qty-3" value=2>
<input type=hidden name="item_id" value="4">
<input type=hidden size="2" name="qty-4" value=2>
<input type="submit" name="Add" value="Add to Cart" class="btn">
</td></form>
Please note the 'td' tags are just part of what I copied and pasted from our page and are obviously not required for this to work.
Hope this helps.