0

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

4

3 回答 3

1

A simple class hierarchy might be:

Order has ItemContainers has Items

Both ItemContainers and Items would have a quantity.

Kindness,

Dan

于 2009-12-23T11:34:44.450 回答
1

简单地要求用户选择一束鲜花,然后显示带有复选框的鲜花列表,并将选中的框数与他们的 ID 以及花束一起存储在会话中。最终的购物车表将有花 id、花束 id 和花数,您可以通过让他创建花束然后向其中添加鲜花来关联这种关系

于 2009-12-23T12:41:18.480 回答
1

仔细想想,这有点像那些将笔记本电脑放在篮子里,然后对其进行自定义的应用程序。但相反,您在篮子里放了一束花,然后定制它!

找到这个演示后,我们一直在做类似的事情(与食物相关)......

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

我们已经对其进行了修改,因此我们将基本食物作为笔记本电脑,然后以与内存处理器等相同的方式完成附加组件。

于 2010-05-13T09:42:47.857 回答