views:

51

answers:

3

I'm building an e-commerce website in ASP.Net/C# and I'm having some difficulties with my shopping cart...

I want my costumers to be able to say "I want X boxes, and each box carries Y items".

Let's say, for instance, my website sells flowers. A client logs in and then chooses X bouquets and then for each bouquet he adds flowers from the catalog.

Can you point me out some links or tips in order to achieve this behaviour?

Thanks

+1  A: 

A simple class hierarchy might be:

Order has ItemContainers has Items

Both ItemContainers and Items would have a quantity.

Kindness,

Dan

Daniel Elliott
+1  A: 

simple ask user to select a bouquets then display a list of flowers with checkboxes and store the checked number of boxes in session with their ids as well as the bouquets. the final cart table will have flower id, bouquets id and flower count and you can associate this relation by asking him to create a bouquets and then add flowers to it

Pankaj
+1  A: 

When you think about it, this is a little like those applications where you put a laptop in your basket, and then customize it. But instead you put a bouquet in your basket, and customize it!

We've been doing something similar (food related) having found this demo...

http://demo.kartris.com/Spotpal-1800-SA/p-10/

We've modified it instead so we have our base food item as the laptop, and then the add ons are done in the same way as memory processor etc.

Marcus D