Index | - | FAQ - Misc |
Below is an example of how to combine two or more products into a single add to cart button. Clicking on the one button will add both products to the shoppers basket. See also: Combining two products into a single add to cart button Button One <form method="post" style="margin-bottom: 0" action="https://www.cartmanager.net/cgi-bin/cart.cgi"> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td align="right">Quantity</td><td width="5">:</td> <td align="left"><input type="text" name="VARP1Quantity_rawtext" value="1" size="4"></td> </tr> <tr> <td colspan="3" align="center"> <input type="hidden" name="AddItemP1" value="demo|TestONE|4|VARP1Quantity_rawtext|P1||prompt|1"> <input type="submit" value="Add To Cart" alt="Add To Cart"> </td> </tr> </table> </form> Button Two <form method="post" style="margin-bottom: 0" action="https://www.cartmanager.net/cgi-bin/cart.cgi"> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td align="right">Quantity</td><td width="5">:</td> <td align="left"><input type="text" name="VARP2Quantity_rawtext" value="1" size="4"></td> </tr> <tr> <td colspan="3" align="center"> <input type="hidden" name="AddItemP2" value="demo|TestONE|4|VARP2Quantity_rawtext|P2||prompt|1"> <input type="submit" value="Add To Cart" alt="Add To Cart"> </td> </tr> </table> </form> Button Combined <form method="post" style="margin-bottom: 0" action="https://www.cartmanager.net/cgi-bin/cart.cgi"> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td align="right">Quantity</td><td width="5">:</td> <td align="left"><input type="text" name="VARP1Quantity_rawtext" value="1" size="4"></td> </tr> <tr> <td align="right">Quantity</td><td width="5">:</td> <td align="left"><input type="text" name="VARP2Quantity_rawtext" value="1" size="4"></td> </tr> <tr> <td colspan="3" align="center"> <input type="hidden" name="AddItemP1" value="demo|TestONE|4|VARP1Quantity_rawtext|P1||prompt|1"> <input type="hidden" name="AddItemP2" value="demo|TestONE|4|VARP2Quantity_rawtext|P2||prompt|1"> <input type="submit" value="Add To Cart" alt="Add To Cart"> </td> </tr> </table> </form> |