close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

size and color options

Thread began 2/15/2010 7:58 pm by hcijun384863 | Last modified 2/16/2010 6:06 pm by hcijun384863 | 977 views | 3 replies

hcijun384863

size and color options

I tried to figure out how to add options in the cart for several days but I couldn’t.
I will add two options (color and size) in the product detail pages where size is dependent on color. There might be several ways to design database but my design is as follows:
DIM_Product table has (product_code, product_id, product_desc, pack_price, picture, color_code, size_code, stock, and so on) fields.
DIM_Color table has (color_code, color_id, color_desc) fields.
DIM_Size table has (size_code, size_id, size_desc) fileds.

Please let me know if I miss something to create options in product detail pages (I am trying to understand one option for this help).

First, I created recordset, ‘rscolor’ using two tables (DIM_Product and DIM_Color).
SELECT *
FROM dim_product JOIN dim_color ON dim_product.color_code = dim_color.color_code
WHERE dim_product.stock = 1 AND dim_product.product_id = '12539S'
ORDER BY dim_color.color_desc

Second, I created List/Menu using rscolor recordset.
I selected values as Product_Code and labels as Color_Desc.

Third, I created another recordset, ‘rsproduct’ using the same tables (DIM_Product and DIM_Color).
SELECT *
FROM dim_product JOIN dim_color ON dim_product.color_code = dim_color.color_code
WHERE dim_product.product_code = color_choice
The variable name is color_choice, Type is integer, Default value is -1, and Runtime value is $_POST['Product_Code'] in the Edit Variable dialog box.

Finally, I added cart button using the recordset, ‘rsproduct’, redirected to cart page, and did binding.

When I clicked add to cart button in product detail page, it is not redirected to the cart page but stays in the product page. I tried using ‘rscolor’ for add to cart button as the recordset information is almost same, in this case I could see the cart page but always add the first record where it seems like that binding is not working.
Please help me how to add options to the cart.

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