View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Product Options

Thread began 10/21/2009 1:14 pm by eaddudley390229 | Last modified 3/11/2010 5:43 pm by eaddudley390229 | 2623 views | 7 replies

Jason ByrnesWebAssist

this part is a fairly big undertaking.

First, lets think about the work flow and how the tables relate:

you have 3 pieces:
1-The OptionGroup

2-The Option Name

3-The Product

the Option Name relates to the option group

First you create an option Group, then add an option name to that group.

The option group and option name are completely separate from the product.

using the productoptions table, you can "assign" an option name to a product.

an option name can be assigned to multiple products, and effect the price differently on each because of the productoptionPriceIncrement column

so onto creating the product insert:

1) you need to have a page to enter new Option groups, this is a simple page, with one form element on it:
Group Name:

use the Data Assist Insert Record behavior to insert the group name into the optiongroups.optiongroupName column.

2) You need another page to create option names. The option name needs to relate to the optiongroups table.

This page will have two form elements:
OptionGroup - Select List
OptionName - text Box

For the option group Select list, create a recordset:
SELECT * FROM optiongroups

set the OptionGroup select list to be dynamic, use the optiongroups.optiongroupID column for the value and the optiongroups.optiongroupName for the label.

The DataAssist Inssert Record server behavior will store the option group in the options.optionOptiongroupID column and the OptionName in the options.optionName

3) Then Use DataAssist to create pages for managing the product table. I would use the product detail page manage product options for the selected product.

You need to have a form with 4 elements:
OptionGroup - Select list
OptionName - Select List
PriceIncrement - Text Box
productID - hidden Form Element

create a recordset for the option groups:
SELECT * FROM optiongroups

set the OptionGroup select list to be dynamic, use the optiongroups.optiongroupID column for the value and the optiongroups.optiongroupName for the label.

Create a recordset for the option names:
SELECT * FROM options

Here you need to use dynaic Dropdowns to populate the OptionName select list.

Use the Create Dynamic Array Server behavior, use the rsOptionNames recordset. set the parent ID to the optionOptiongroupID column. The child ID to the optionID column and the Child text to the optionName column

In design View, select the OptionGroup select list, on the Bindings Panel, click the plus button and select WA Dynamic Dropdowns -> Populate List From Array. use the OptionGroup as the parent list and the OptionName as the child list.

For the productID hidden Form Element, bind to the Product ID column from the WAProduct recordset.

you then need to add a DataAssist Insert record behavior to the page for the productoptions table.

Bind the productoptionOptiongroupID column to the OptionGroup select list.
The productoptionOptionID column to the OptionName Select List.
the productoptionPriceIncrement column to the PriceIncrement Text Box.
and the productoptionProductID column to the productID hidden Form Element.

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