Our shopsite url is http://womenonwheels.org/store/page50.html
Last year I recorded addl info using the following template, which captured the requested information.
[-- DEFINE PRODUCT --]
[-- INCLUDE Product-GraphicAlign PROCESS --]
[-- INCLUDE Product-Graphic PROCESS --]
[-- INCLUDE Product-Name PROCESS --]
[-- INCLUDE Product-Price PROCESS --]
[-- INCLUDE Product-Sku PROCESS --]
[-- INCLUDE Product-Description PROCESS --]
<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="hidden" name="itemnum" value="[-- PRODUCT.RecordNumber --]">
<input type=hidden name="[-- PRODUCT.RecordNumber --]:finoptnum" value=4>
<input name="[-- PRODUCT.RecordNumber --]:finopt:0" type=hidden id="[-- PRODUCT.RecordNumber --]:finopt:0" value="Name ">Name<br>
<input name="[-- PRODUCT.RecordNumber --]:finopt:0" type="text" id="[-- PRODUCT.RecordNumber --]:finopt:0" value="" size="15"><br>
<input name="[-- PRODUCT.RecordNumber --]:finopt:1" type=hidden id="[-- PRODUCT.RecordNumber --]:finopt:1" value="Member Number ">Member Number<br>
<input name="[-- PRODUCT.RecordNumber --]:finopt:1" type="text" id="[-- PRODUCT.RecordNumber --]:finopt:1" value="" size="15"><br>
<input name="[-- PRODUCT.RecordNumber --]:finopt:2" type=hidden id="[-- PRODUCT.RecordNumber --]:finopt:2" value="Chapter Affiliation ">Chapter Affiliation<br>
<input name="[-- PRODUCT.RecordNumber --]:finopt:2" type="text" id="[-- PRODUCT.RecordNumber --]:finopt:2" value="" size="15"><br>
<input name="[-- PRODUCT.RecordNumber --]:finopt:3" type=hidden id="[-- PRODUCT.RecordNumber --]:finopt:3" value="Number of previous Ride-Ins attended ">Number of previous Ride-Ins attended<br>
<input name="[-- PRODUCT.RecordNumber --]:finopt:3" type="text" id="[-- PRODUCT.RecordNumber --]:finopt:3" value="" size="5"><br>
<select name="[-- PRODUCT.RECORDNUMBER --]:qnty"> <option value="1">1</option> </select>
<input value="Add To Cart" type="submit">
</form>
[-- INCLUDE Product-GraphicRight PROCESS --]
[-- END_DEFINE PRODUCT --]
This year we need to use radio button selection type, so are using subproducts. I have the following template in use, the requested addl information fields appear on the screen, but the input is not captured. What have I missed in the following template code? Note: I do have the same template in use for the product and the subproducts.
[-- DEFINE SUBPRODUCT --]
<input type="radio" checked="checked" name="itemnum" value="[-- PRODUCT.RecordNumber --]">[-- PRODUCT.Name --]
[-- IF PRODUCT.SaleAmount --][-- PRODUCT.SaleAmount --][-- ELSE --]
[-- PRODUCT.Price --][-- END_IF --]
[-- END_DEFINE SUBPRODUCT --]
[-- DEFINE PRODUCT --]
<CENTER>
[-- INCLUDE Product-Graphic PROCESS --]
[-- INCLUDE Product-Name PROCESS --]
[-- INCLUDE Product-Sku PROCESS --]
[-- INCLUDE Product-Description PROCESS --]
<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="hidden" name="itemnum" value="[-- PRODUCT.RecordNumber --]">
<input type=hidden name="[-- PRODUCT.RecordNumber --]:finoptnum" value=4>
<input name="[-- PRODUCT.RecordNumber --]:finopt:0" type=hidden id="[-- PRODUCT.RecordNumber --]:finopt:0" value="Name ">Name<br>
<input name="[-- PRODUCT.RecordNumber --]:finopt:0" type="text" id="[-- PRODUCT.RecordNumber --]:finopt:0" value="" size="15"><br>
<input name="[-- PRODUCT.RecordNumber --]:finopt:1" type=hidden id="[-- PRODUCT.RecordNumber --]:finopt:1" value="Member Number ">Member Number<br>
<input name="[-- PRODUCT.RecordNumber --]:finopt:1" type="text" id="[-- PRODUCT.RecordNumber --]:finopt:1" value="" size="15"><br>
<input name="[-- PRODUCT.RecordNumber --]:finopt:2" type=hidden id="[-- PRODUCT.RecordNumber --]:finopt:2" value="Chapter Affiliation ">Chapter Affiliation<br>
<input name="[-- PRODUCT.RecordNumber --]:finopt:2" type="text" id="[-- PRODUCT.RecordNumber --]:finopt:2" value="" size="15"><br>
<input name="[-- PRODUCT.RecordNumber --]:finopt:3" type=hidden id="[-- PRODUCT.RecordNumber --]:finopt:3" value="Number of previous Ride-Ins attended ">Number of previous Ride-Ins attended<br>
<input name="[-- PRODUCT.RecordNumber --]:finopt:3" type="text" id="[-- PRODUCT.RecordNumber --]:finopt:3" value="" size="5"><br>
<br>
########################
# SUBPRODUCTS #
########################
<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>
<TABLE>
<TR><TD>
[-- IF PRODUCT.SubProduct --]
[-- LOOP SUBPRODUCTS --]
[-- SUBPRODUCTS --]<br>
[-- END_LOOP SUBPRODUCTS --]
[-- ELSE --]
<input type="hidden" name="itemnum" value="[-- PRODUCT.RecordNumber --]">
[-- END_IF --]
</TD><TD>
########################
# ADD TO CART #
########################
<input type=image src="[-- OUTPUT_DIRECTORY_URL --]/media/add_to_cart.gif" width=83 height=20 alt="add_to_cart.gif" hspace=3 vspace=3 border=0 align="bottom" name="Add to Cart" alt="Add to Cart">
</TD></TR></TABLE>
</form>
[-- INCLUDE Product-GraphicRight PROCESS --]
[-- END_DEFINE PRODUCT --]
The add to cart on the above products caused an error and would not process the selection. I have now changed it to the following:
[-- DEFINE SUBPRODUCT --]
<input type="radio" checked="checked" name="itemnum" value="[-- PRODUCT.RecordNumber --]">[-- PRODUCT.Name --]
[-- IF PRODUCT.SaleAmount --][-- PRODUCT.SaleAmount --][-- ELSE --]
[-- PRODUCT.Price --][-- END_IF --]
[-- END_DEFINE SUBPRODUCT --]
[-- DEFINE PRODUCT --]
<CENTER>
[-- INCLUDE Product-Graphic PROCESS --]
[-- INCLUDE Product-Name PROCESS --]
[-- INCLUDE Product-Sku PROCESS --]
[-- INCLUDE Product-Description PROCESS --]
<br>
########################
# SUBPRODUCTS #
########################
<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="hidden" name="itemnum" value="[-- PRODUCT.RecordNumber --]">
<input type=hidden name="[-- PRODUCT.RecordNumber --]:finoptnum" value=4>
<input name="[-- PRODUCT.RecordNumber --]:finopt:0" type=hidden id="[-- PRODUCT.RecordNumber --]:finopt:0" value="Name ">Name<br>
<input name="[-- PRODUCT.RecordNumber --]:finopt:0" type="text" id="[-- PRODUCT.RecordNumber --]:finopt:0" value="" size="15"><br>
<input name="[-- PRODUCT.RecordNumber --]:finopt:1" type=hidden id="[-- PRODUCT.RecordNumber --]:finopt:1" value="Member Number ">Member Number<br>
<input name="[-- PRODUCT.RecordNumber --]:finopt:1" type="text" id="[-- PRODUCT.RecordNumber --]:finopt:1" value="" size="15"><br>
<input name="[-- PRODUCT.RecordNumber --]:finopt:2" type=hidden id="[-- PRODUCT.RecordNumber --]:finopt:2" value="Chapter Affiliation ">Chapter Affiliation<br>
<input name="[-- PRODUCT.RecordNumber --]:finopt:2" type="text" id="[-- PRODUCT.RecordNumber --]:finopt:2" value="" size="15"><br>
<input name="[-- PRODUCT.RecordNumber --]:finopt:3" type=hidden id="[-- PRODUCT.RecordNumber --]:finopt:3" value="Number of previous Ride-Ins attended ">Number of previous Ride-Ins attended<br>
<input name="[-- PRODUCT.RecordNumber --]:finopt:3" type="text" id="[-- PRODUCT.RecordNumber --]:finopt:3" value="" size="5"><br>
<TABLE>
<TR><TD>
[-- IF PRODUCT.SubProduct --]
[-- LOOP SUBPRODUCTS --]
[-- SUBPRODUCTS --]<br>
[-- END_LOOP SUBPRODUCTS --]
[-- ELSE --]
<input type="hidden" name="itemnum" value="[-- PRODUCT.RecordNumber --]">
[-- END_IF --]
</TD><TD>
########################
# ADD TO CART #
########################
<input type=image src="[-- OUTPUT_DIRECTORY_URL --]/media/add_to_cart.gif" width=83 height=20 alt="add_to_cart.gif" hspace=3 vspace=3 border=0 align="bottom" name="Add to Cart" alt="Add to Cart">
</TD></TR></TABLE>
</form>
[-- INCLUDE Product-GraphicRight PROCESS --]
[-- END_DEFINE PRODUCT --]
Now the selection of the subproducts puts the subproduct and the product into the shopping cart (at least the error went away). What is causing both the product and selected subproduct to be put into the shopping cart with one click of the add to cart button?
Thank you in advance for your help.
dafiwow