close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Item by Color

Thread began 5/21/2009 3:04 pm by jenbar3378469 | Last modified 5/21/2009 5:30 pm by Ray Borduin | 1438 views | 7 replies |

jenbar3378469

Item by Color

Hi, I am trying to put a drop down menu underneath a golf umbrella by color so that when user selects color it auto populates the shopping cart. This is what technical support told me to do:
This will start out by creating a recordset on your product detail page. This recordset should be filtered on the product id so that only that product's info is displayed on the page.

You can add in additional recordsets to select the sizes and colors for that item as well. Once you have all of these recordsets on the page you would then add in the select lists to your add to cart form and set them dynamically to be populated from the recordsets.

The final step in this process would be to alter your cart object to ensure that it has columns for these values, once you have done that you only need to update your add to cart server behavior so that it binds the newly created select lists to their corresponding cart columns.

This is just a high level overview of the process, please post back with any specific questions that you have about any part of this and we will be glad to help you get this worked out.

I have done this. I created a separate MySQL table named "Golf" and then added recordsets by color. Here is what my code for this "Add to Cart" button looks like:

<form name="sumidrive1_15_ATC_<?php echo $row_rsGolfUmbrella["golfId"]; ?>" method="POST" action="<?php echo $_SERVER["PHP_SELF"]; ?><?php echo (isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] != "")?"?".$_SERVER["QUERY_STRING"]:""; ?>">
<input type="hidden" name="sumidrive1_15_ID_Add" value="<?php echo $row_rsGolfUmbrella["golfId"]; ?>" >
<input name="sumidrive1_15_Quantity_Add" type="text" class="qtyformelem" value="1" size="4" >
<select name="sumidrive1_15_Color_Add">
<option value="<?php echo $row_rsGolfBlk["golfColor"]; ?>" selected="selected">Black</option>
<option value="<?php echo $row_rsGolfNavy["golfColor"]; ?>">Navy</option>
</select>
<input name="sumidrive1_15_ATC" type="image" class="cartbutton" value="Add to Cart" src="/assets/misc images/cart.gif" alt="Add to Cart" border="0">
</form>

Currently when I add to cart, nothing is being picked up. Please help! Maybe I am filtering my recordsets incorrectly. Thanks!

Sign in to reply to this post

Ray BorduinWebAssist

Looks like you may have misunderstood. How many items are in your catalog? Do you even need a database for this?

Lets run with you do for arguments sake.

You should have two recordsets. One rsGolfUmbrella that you already had, and another for rsGolfUmbrellaColors... Then you should be populating the list in the add to cart form from the second recordset using the "Dynamic" button in the properties panel.

But really you may not need a recordset... would it work if you just used:
<form name="sumidrive1_15_ATC_<?php echo $row_rsGolfUmbrella["golfId"]; ?>" method="POST" action="<?php echo $_SERVER["PHP_SELF"]; ?><?php echo (isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] != "")?"?".$_SERVER["QUERY_STRING"]:""; ?>">
<input type="hidden" name="sumidrive1_15_ID_Add" value="<?php echo $row_rsGolfUmbrella["golfId"]; ?>" >
<input name="sumidrive1_15_Quantity_Add" type="text" class="qtyformelem" value="1" size="4" >
<select name="sumidrive1_15_Color_Add">
<option value="Black" selected="selected">Black</option>
<option value="Navy">Navy</option>
</select>
<input name="sumidrive1_15_ATC" type="image" class="cartbutton" value="Add to Cart" src="/assets/misc images/cart.gif" alt="Add to Cart" border="0">
</form>

Sign in to reply to this post

jenbar3378469

Thanks for the help! I added the code, but the shopping cart is not picking up anything! No column values at all, and 0.00 for the price. The rest of the items on the page work, but they do not have color options, etc. Please help! Could there be something wrong with my recordset? Do I not need to build any recordsets at all with the code that you gave me? If I do need recordsets, how do I filter them? Thanks!!!

Sign in to reply to this post

Ray BorduinWebAssist

It depends on your store and how many items you have.

If you have multiple items with different colors, than you have to use two recordsets like my first example. I was starting to think your store had only one item so no recordset would be needed.

Sign in to reply to this post

jenbar3378469

Thanks Ray, but how would I filter the two recordsets? For instance the rsGolfumbrella would have the following columns: itemId, itemName, itemDesc, itemPrice, itemQty, itemColor with a recordset being filtered on the itemId. So what columns should my second table have? (The GolfUmbrellaColors) and what MySQL statement would I use to filter this? Thank you!!!

Sign in to reply to this post

Ray BorduinWebAssist

Try reading: showthread.php?t=1046&page=4

see if that helps

Sign in to reply to this post

jenbar3378469

Ok Ray, but I do just have one option for my items, like either size or color. I have a call into tech support. Can't I just filter the recordset as I normally would, don't tie anything to the select list, but make it updateable and then fill in my colors and/or sizes? Would that not work?

I do have a call into tech support. Do you think they will call me?

Thanks!

Sign in to reply to this post

Ray BorduinWebAssist

Yes that will work. Tech support will eventually contact you. But they aren't going to do this for you and it isn't a bug or issue with the software, so you are going to have to get your head around it one way or another. Maybe they will explain it better than I will.

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

Content

rating

Layout

rating

Ease of use

rating

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...