Adding Multiple At Once With Quantity Option

fc_joshfc_josh FoxyCart Team
in Help edited August 2010
We are working on a custom shirt builder for a client. We are having to use the Fake Form Javascript since we are using LightCMS. I am following the directions from here but I am not able to get it to work. Also, is it possible to have multiple quantities? For example: Customer chooses 5 of size XL and 5 of size M and adds both with one Add To Cart click. My code is below:

BODY
<DIV CLASS="custom_section" ID="step2">
		<DIV CLASS="foxycart_form">

			<DIV CLASS="heading">
			<UL>
			<LI CLASS="disabled"><A HREF="javascript:animatedcollapse.toggle('step1')">Choose Product</A></LI>
			<LI CLASS="active">Customize Product</LI>
			<LI CLASS="last disabled">Finalize Order</LI>
			</UL>
			</DIV>

			

				<DIV ID="baseball_tee">

					<DIV CLASS="product_left">

						<IMG SRC="styles/images/custom_products/baseball_tee_white_black.jpg" ID="picture">

					</DIV>	

					<DIV CLASS="product_right">

						<!-- NAME -->
						<DIV CLASS="name">Baseball Tee</DIV>

						<!-- PRICE -->
						<DIV CLASS="price">$9.98</DIV>

						<!-- DETAILS -->
						<DIV CLASS="details">
						- Port &amp; Company Long Sleeve Denim<br />
						- 6.5 ounce, 100% cotton
						</DIV>
						
						<!-- COLOR -->
						<DIV CLASS="label">Color</DIV>
						<SELECT NAME="color" onChange="picture.src=this.options[this.selectedIndex].getAttribute('data-whichPicture');">
						<OPTION VALUE="choose" SELECTED="selected" data-whichPicture='styles/images/custom_products/baseball_tee_white_black.jpg'>[ Please Select ]</option>
						<OPTION VALUE="White/Black" data-whichPicture='styles/images/custom_products/baseball_tee_white_black.jpg'>White/Black</OPTION>
						<OPTION VALUE="White/Gold" data-whichPicture='styles/images/custom_products/baseball_tee_white_gold.jpg'>White/Gold</OPTION>
						<OPTION VALUE="White/Navy" data-whichPicture='styles/images/custom_products/baseball_tee_white_navy.jpg'>White/Navy</OPTION>
						<OPTION VALUE="White/Red" data-whichPicture='styles/images/custom_products/baseball_tee_white_red.jpg'>White/Red</OPTION>
						<OPTION VALUE="White/Royal" data-whichPicture='styles/images/custom_products/baseball_tee_white_royal.jpg'>White/Royal</OPTION>
						<OPTION VALUE="White/Dark Green" data-whichPicture='styles/images/custom_products/baseball_tee_white_dark_green.jpg'>White/Dark Green</OPTION>
						<OPTION VALUE="Grey Heather/Navy" data-whichPicture='styles/images/custom_products/baseball_tee_grey_heather_navy.jpg'>Grey Heather/Navy</OPTION>
						<OPTION VALUE="Grey Heather/Black" data-whichPicture='styles/images/custom_products/baseball_tee_grey_heather_black.jpg'>Grey Heather/Black</OPTION>
						</SELECT>

						<!-- SIZE -->
						<DIV CLASS="label">Size</DIV>
						<SELECT NAME="size">
						<OPTION VALUE="choose" SELECTED="selected">[ Please Select ]</OPTION>
						<OPTION VALUE="choose"></OPTION>
						<OPTION VALUE="choose">ADULT</OPTION>
						<OPTION VALUE="XS">XS</OPTION>
						<OPTION VALUE="S">S</OPTION>
						<OPTION VALUE="M">M</OPTION>
						<OPTION VALUE="L">L</OPTION>
						<OPTION VALUE="XL">XL</OPTION>
						<OPTION VALUE="2X">2X</OPTION>
						<OPTION VALUE="3X">3X</OPTION>
						<OPTION VALUE="4X">4X</OPTION>
						<OPTION VALUE="5X">5X</OPTION>
						<OPTION VALUE="6X">6X</OPTION>
						<OPTION VALUE="choose"></OPTION>
						<OPTION VALUE="choose">YOUTH</OPTION>
						<OPTION VALUE="S">S</OPTION>
						<OPTION VALUE="M">M</OPTION>
						</SELECT>

						<!-- QUANTITY -->
						<DIV CLASS="label">QTY</DIV>
						<DIV CLASS="quantity"><INPUT TYPE="text" NAME="quantity" VALUE="1"></DIV>

						<!-- SIZE -->
						<DIV CLASS="label">Size</DIV>
						<SELECT NAME="2:size">
						<OPTION VALUE="choose" SELECTED="selected">[ Please Select ]</OPTION>
						<OPTION VALUE="choose"></OPTION>
						<OPTION VALUE="choose">ADULT</OPTION>
						<OPTION VALUE="XS">XS</OPTION>
						<OPTION VALUE="S">S</OPTION>
						<OPTION VALUE="M">M</OPTION>
						<OPTION VALUE="L">L</OPTION>
						<OPTION VALUE="XL">XL</OPTION>
						<OPTION VALUE="2X">2X</OPTION>
						<OPTION VALUE="3X">3X</OPTION>
						<OPTION VALUE="4X">4X</OPTION>
						<OPTION VALUE="5X">5X</OPTION>
						<OPTION VALUE="6X">6X</OPTION>
						<OPTION VALUE="choose"></OPTION>
						<OPTION VALUE="choose">YOUTH</OPTION>
						<OPTION VALUE="S">S</OPTION>
						<OPTION VALUE="M">M</OPTION>
						</SELECT>

						<!-- QUANTITY -->
						<DIV CLASS="label">QTY</DIV>
						<DIV CLASS="quantity"><INPUT TYPE="text" NAME="2:quantity" VALUE="1"></DIV>

						<!-- HIDDEN FIELDS -->			
						<INPUT TYPE="hidden" VALUE="Baseball Tee" NAME="name" />
						<INPUT TYPE="hidden" VALUE="9.98" NAME="price" />

					</DIV>

					<DIV CLASS="clear"></DIV>

				</DIV>

			<DIV CLASS="navigation">
			<A CLASS="link_left" HREF="javascript:animatedcollapse.toggle('step1')">Previous</A>
			<A HREF="https://greatplainsgraphics.foxycart.com/cart"; CLASS="foxycart foxycart_submit link_right">Add To Cart</A>
			<DIV CLASS="clear"></DIV>
			</DIV>

		</DIV>
		</DIV>

Thank you so much for your help!
Comments
  • fc_joshfc_josh FoxyCart Team
    Nevermind. I got it fixed. I had forgotten to had a second name and price.
Sign In or Register to comment.