The overall layout would be similar to the Page and product layouts for multi-add to cart form described on http://www.shopsite.com/help/12.0/en-US/sc/pro/custom.template.multi-add.html .
In the product template for the body of the product use code from the Page section of the template to create the form for adding the items to the cart. You would start with the
- Code: Select all
# Start the Form. This custom template tag is very important!
<FORM action="[-- SHOPPING_CART_URL BASE --]/order.cgi" method=post>
and copy everything down to the
- Code: Select all
# End the FORM
</FORM>
You will need to modify the
- Code: Select all
#Display the Products - The Products must us a special Template also
[--LOOP PRODUCTS --]
[--PRODUCT--]
[--END_LOOP PRODUCTS--]
to reference the subproducts.
- Code: Select all
#Display the Products - The Products must us a special Template also
[--LOOP SUBPRODUCTS --]
[--SUBBPRODUCTS--]
[--END_LOOP SUBPRODUCTS--]
In the [-- DEFINE SUBPRODUCT --] section of the template you would use the code from the Product section of the above mentioned Multi-add to cart help page http://www.shopsite.com/help/12.0/en-US/sc/pro/custom.template.multi-add.html . I think you could just copy the entire DEFINE PRODUCT section and change that to be [--DEFINE SUBPRODUCT --] and end with {-- END_DEFINE SUBPR)DUCT --]
To get your main product listed along with all the other sub products you simply assign it as a subproduct to itself. You can then arrange the subproducts to make sure the main product is listed as the first subproduct.