The ShopSite documentation page here shows how to make an add to cart form:
http://www.shopsite.com/templates/examp ... tions.html
Basically you would put this form in the DEFINE MORE_INFO_PAGE section of your product template, but change the hidden itemnum field to be a checkbox field instead, add a quantity text box, and insert your LOOP SUBPRODUCTS loop before the submit button and closing form tag, something like this:
- Code: Select all
<form action="[-- SHOPPING_CART_URL Base --]/order.cgi" method="post">
<input type="hidden" name="storeid" value="[-- STORE.ID --]">
<input type="hidden" name="dbname" value="products">
<input type="hidden" name="function" value="add">
<input type=checkbox name="itemnum" value="[-- PRODUCT.RecordNumber --]">
<input type=text size=2 name="[-- PRODUCT.RecordNumber --]:qnty" value="1">
[-- LOOP SUBPRODUCTS --]
<br>[-- SUBPRODUCTS --]
[-- END_LOOP SUBPRODUCTS --]
<input type="submit" value="[-- PRODUCT.AddToCartButton --]">
</form>
Then in your DEFINE SUBPRODUCT section, you would include the same type of itemnum and quantity box form fields as you did for the main product, so something like this:
- Code: Select all
[-- DEFINE SUBPRODUCT --]
<input type=checkbox name="itemnum" value="[-- PRODUCT.RecordNumber --]">
<input type=text size=2 name="[-- PRODUCT.RecordNumber --]:qnty" value="1">
[-- END_DEFINE SUBPRODUCT --]
So now your subproducts will also have a checkbox and quantity field and will be within the same form as the main product on the More Info Page. Of course you would want to flesh out the above code with the product names, prices, and the layout/spacing you want for them, but this is the general idea.
-Loren