HOW TO: create product option selection like on DELL.COM on ASP.NET page for shopping cart

N

nicholas

I already posted this once...but still got no solution, so here's my
problem, explained in another way:

When you want to configure a computer on www.dell.com you have lot's of
option groups with lots of options.
You can for example choose for the Computer Model 1 and than specify these
optiongroups:
processor : 1Ghz - 2Ghz - ...
HD: 40GB - 60 GB - ...
Monitor : TFT 17" - 19" - ...
etc.

All option groups are represented with a dropdown.

The most important thing to note is that not all products have the same
optiongroups.
So sometimes there are, let's say, 10 dropdowns and sometimes more or less
or none at all.

So, I want to create this too on a ASP.NET in VB.NET.

I have products in a table: tbl_products
I have options in a table: tbl_options

The tbl_options contains these fields: optionID, optionparentID, productID,
optionname
Ex, few rows out of the options table
1,0,66,color
2,1,66,white
3,1,66,blue
4,1,66,red
5,0,66,size
6,5,66,small
7,5,66,medium
8,5,66,large
9,0,67,size
10,9,67,17inch
11,9,67,19inch

in this example there are options for 2 products:
product with ID = 66 has
dropdown for color: white, blue, red
dropdown for size: small, medium, large

product with ID = 67 has
dropdown for size: 17inch, 19inch

That's how I designed the option table, but I can change it if someone has a
better idea., but I don't think it's bad.

So, as you can see, all option dropdownboxes for a product should be created
and populated dynamically when the user opens the product-detail-page to add
a product to his shopping cart.

I really hope someone can help me with this and I think it's usefull for
everyone creating an e-commerce.

THX a lot,
Nic
 
K

Kevin Spencer

I really hope someone can help me with this and I think it's usefull for
everyone creating an e-commerce.

Well, it would help if you asked a question or stated a problem of some
kind...

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.
 
N

nicholas

Well, how can I implement this?
So, in other words, how can I have these dropdownboxes being created
dynamically on the page with the data out of my sql-server (tbl_options)?

It would be no problem if it only where 2 dropdownboxes for size and color.
In that case I could just put them on the page and just populate them.
But in my case, sometimes there are no options for a product, so no
dropdownboxes, sometimes there are 2 dds, and it's allways a different
content: could be color, could be size, etc.

;-)
 
G

Guest

You could set flags in your products table like:
HasColor , HasSize, etc.
make these boolean values (bit datatype for sql server).

then you can either create and add these controls to a panel web server
control by doing a if statement...IF HasColor = "True" ...etc then add the
control

OR

The easiest way to do it is create each possible combination of contols in a
panel web control, then based on your if statements you can make the panel
either visible or invisible. by default all panels could be invisible.

I'm sure there are other ways but this is what I can think of
 
B

bruce barker

any book on javascript will teach you to do this.

-- bruce (sqlwork.com)

| I already posted this once...but still got no solution, so here's my
| problem, explained in another way:
|
| When you want to configure a computer on www.dell.com you have lot's of
| option groups with lots of options.
| You can for example choose for the Computer Model 1 and than specify these
| optiongroups:
| processor : 1Ghz - 2Ghz - ...
| HD: 40GB - 60 GB - ...
| Monitor : TFT 17" - 19" - ...
| etc.
|
| All option groups are represented with a dropdown.
|
| The most important thing to note is that not all products have the same
| optiongroups.
| So sometimes there are, let's say, 10 dropdowns and sometimes more or less
| or none at all.
|
| So, I want to create this too on a ASP.NET in VB.NET.
|
| I have products in a table: tbl_products
| I have options in a table: tbl_options
|
| The tbl_options contains these fields: optionID, optionparentID,
productID,
| optionname
| Ex, few rows out of the options table
| 1,0,66,color
| 2,1,66,white
| 3,1,66,blue
| 4,1,66,red
| 5,0,66,size
| 6,5,66,small
| 7,5,66,medium
| 8,5,66,large
| 9,0,67,size
| 10,9,67,17inch
| 11,9,67,19inch
|
| in this example there are options for 2 products:
| product with ID = 66 has
| dropdown for color: white, blue, red
| dropdown for size: small, medium, large
|
| product with ID = 67 has
| dropdown for size: 17inch, 19inch
|
| That's how I designed the option table, but I can change it if someone has
a
| better idea., but I don't think it's bad.
|
| So, as you can see, all option dropdownboxes for a product should be
created
| and populated dynamically when the user opens the product-detail-page to
add
| a product to his shopping cart.
|
| I really hope someone can help me with this and I think it's usefull for
| everyone creating an e-commerce.
|
| THX a lot,
| Nic
|
|
 
N

nicholas

I think this can be done with pure VB.net without javascript...and I would
prefer.

THX for your reply
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top