close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Product Options - Metal/Color and Size

Thread began 9/19/2011 11:39 am by Patbyrne322425963 | Last modified 11/01/2011 6:50 am by Patbyrne322425963 | 4903 views | 31 replies

Patbyrne322425963

Product Options - Metal/Color and Size

Alright, so I am creating a wholesale jewelry site and would like to have 2 options - size (different prices by size) and metal (gold/silver, with price difference).

The thing is, not all jewelry items are available in both gold and silver and not all items have a size option (only rings). Also, not every ring is available in every size.

So the way I set it up was I added a column in my products table for ProductCategory, which contains the first few numbers of the SKU.

I would like the product options to show size options for rings (ProductCategory=400) and metal options for ProductCategory=635. I have my tables set up like this:

optiongroups:
OptionGroupID | OptionGroupName
1 | Size
2 | Metal

options:
OptionID | OptionGroupID | OptionName
1 | 2 | Sterling Silver
2 | 2 | 14K Gold
3 | 1 | size 3
4 | 1 | size 4
5 | 1 | size 5

productoptions:
ProductOptionID | ProductCategory | ProductID | OptionID | OptionGroupID | OptionPriceIncrement
1 | 635 | - | 1 | 2 | -
2 | 635 | - | 2 | 2 | 2.00
3 | 400 | 400101 | 3 | 1 | -
4 | 400 | 400101 | 4 | 1 | 0.50
5 | 400 | 400101 | 5 | 1 | 1.00

products:
ProductCategory | ProductID (primary key) | ...Price, Desc, etc
635 | 635101 | ...
635 | 635102 | ...
400 | 400101 | ...
400 | 400102 | ...

Now, starting with metal (because I gave up on size to focus on this part), I have this in the SQL for rsMetal:

SELECT productoptions.OptionPriceincrement, productoptions.ProductOptionID, options.OptionName, options.OptionGroupID, optiongroups.OptionGroupName
FROM options INNER JOIN productoptions ON options.OptionID = productoptions.OptionID INNER JOIN optiongroups ON options.OptionGroupID = optiongroups.OptionGroupID
WHERE optiongroups.OptionGroupName = 'Metal' AND productoptions.ProductCategory = paramItem

With ParamItem default value: -1, runtime value: $row_WADAproducts['ProductCategory']

I'm following the rest of the directions exactly from the Product Options how-to for the dynamic menu and all I'm getting is a blank menu with the heading "Choose a metal." I don't know what I'm doing wrong.

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