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

rating

size and color options

Thread began 2/15/2010 10:58 pm by hcijun384863 | Last modified 2/16/2010 9:06 pm by Eric Mittman | 693 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.

Sign in to reply to this post

Eric Mittman

It seems that you have this setup correctly, but if you are not getting to the cart page there might be a problem with the way the add to cart is being triggered when you are making use of the product recordset.

What is the trigger for your add to cart? I think it might be easiest to look directly at the page to see if a problem can be spotted. Please post back and include a copy of the add to cart page.

Sign in to reply to this post

hcijun384863

Dear Eric,

I have attached an add to cart page.
Please take a look at and let me know how to fix it.

Attached Files
addtocart.txt
Sign in to reply to this post

Eric Mittman

Thanks for the page, the code looks pretty good to me. The only thing that I can think of is that the query is not returning the expected results. I have opened a ticket for you on this issue. To update the ticket login and visit your support history.

supporthistory.php

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