The Foxy forums are on the move!

We're in the process of moving our forums over to a new system, and so these forums are now read-only.
If you have a question about your store in the meantime, please don't hesitate to reach out to us via email.

Fairly simple question

ShopGenteiShopGentei Member
in Bugs & Feature Requests edited March 2008
I have a red t-shirt and a blue t-shirt for sale. Both come in s,m,l. The price is the same for all of them. How do i setup a form that allows me to select the color I want and the size I want, and possibly the quantity. I want 2, S, Blue shirts at the price of $x(2).

  • brettbrett FoxyCart Team
    Are you looking for html code samples, or just a general overview?
  • You guys never sleep. I'm in Japan and its, what, 3 am there?! Ha.

    HTML would be great, an overview would suffice. I looked about in the wiki and didn't see anything. I assume it's custom code?

    If it is, could I get a snippet?

  • brettbrett FoxyCart Team
    edited March 2008
    Here's a basic example with a size select box:

    Here's the documentation on the actual attributes and such:

    If you need help actually constructing a form, let me know and we'll work up a super basic documentation page with some examples.

    Edit: And no, we rarely sleep ;) Hooray Japan! You live there, or just visiting?
  • Thanks Brett!

    Yeah, I live in Japan. I'm working here for a little while, living in the country, and learning to speak Japanese. Good times.

    Would it look something like this:
    <input type="hidden" name="name" value="SEO Ecommerce T-Shirt" />
    <input type="hidden" name="price" value="20" />
    	<label class="label_left">Size</label>
    <select name="size">
    	<option value="small">Small</option>
    	<option value="medium">Medium</option>
    	<option value="large">Large</option>
    <label class="label_left">Color</label>
    <select name="color">
    		<option value="red">Red</option>
    		<option value="blue">Blue</option>
    		<option value="black">Black</option>
  • brettbrett FoxyCart Team
    Looks good (inside of a <form><input type="hidden" name="phpMyAdmin" value="fbc82b46d67e062279320c2d5bfa4a74" />, clearly).

    To get a quantity field, you can use any input (a hidden input, a select box, a text input, etc.) with the name "quantity" and that'll be the quantity. So:
    <input name="quantity" value="1" type="text" />
    would get you a text input that'd set the quantity. You might want to default it to 1.

    Let me know how that goes.
Sign In or Register to comment.