close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues


Checkout by size and color

Thread began 5/12/2010 9:22 am by jenbar3378469 | Last modified 5/13/2010 6:14 pm by Jimmy Wu | 889 views | 1 replies |


Checkout by size and color

Hi I currently have my pages set up so that if we have 3 colors of the same style shirt the shopper would just use a pull down menu for the size and then another pull down menu for the color. Everything is working fine, it is storing in my database so I have all database fields set correctly...

My question is, what do I do when we run out of a certain color in a certain size?

Here is my code for the add to cart button:

<td align="center" valign="top">
<form name="sum1_7_ATC_<?php echo $row_rsSilk["itemId"]; ?>" method="POST" action="<?php echo $_SERVER["PHP_SELF"]; ?><?php echo (isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] != "")?"?".$_SERVER["QUERY_STRING"]:""; ?>">
<input type="hidden" name="sum1_7_ID_Add" value="<?php echo $row_rsSilk["itemId"]; ?>" >
<input name="sum1_7_Quantity_Add" type="text" class="qtyformelem" value="1" size="4" >
<select name="sum1_7_Size_Add">
<option value="M" selected="selected">Medium</option>
<option value="L">Large</option>
<option value="XL">XLarge</option>
<option value="XXL">XXLarge</option>
<select name="sum1_7_Color_Add">
<option value="White" selected>White</option>
<option value="Steel Gray">Steel Gray</option>
<option value="Blue">Blue</option>
<input type="image" src="/assets/misc images/cart.gif" border="0" class="cartbutton" value="Add to Cart" name="sum1_7_ATC" alt="Add to Cart">
</form> </td>

Please let me know if you need anything else.


Sign in to reply to this post

Jimmy Wu

One thing you can do is to just remove it from the dropdown options so that it doesn't show up and the user can't select it. This would be the simplest way to accomplish not allowing users to order something that is sold out.

Another way is to use a recordset to get the various different availabilities of the combinations of options and store these in variables. Then on the form, you could write out a function that would check the availability in the onsubmit of the form. Customization like this isn't supported however, so you would have to implement it yourself.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...