Forums

This topic is locked

Is it possible to have nested shopping carts?

Posted 19 Jan 2003 23:01:09
1
has voted
19 Jan 2003 23:01:09 Robert Kruse posted:
Sorry for the strange question, but curiosity has got me thinking.

Say you were designing a cart for a basket company, where the user had control over the different quantities and colors of all the different sorts of
items that could be put into the basket.

So they submit each item that they want in their basket into the shopping cart. The cart displays each individual item for the basket. The normal stuff.

Here's where the complication begins. What if the user wants to buy more than 1 basket, all filled with different things? Wouldn't it be nice to have the cart only display, Basket Order 1, Basket Order 2, etc? Then to have the ability to go back into Basket Order 1, and edit all the different items contained in that basket.

As far as I can figure, wouldn't you need some sort of sub cart or nested cart? Is that even possible?

Just something to ponder over.

Thanks

Replies

Replied 20 Jan 2003 01:48:11
20 Jan 2003 01:48:11 Owen Eastwick replied:
I can think of a way of doing this quite easily.

First a customer selects a basket, which is then given an ID lets say 1, then they select all the items that are to be packed in basket ID 1, these are in turn given ID's 1, 2, 3 etc. Concatenate the Basket ID with the Item ID's to produce 1.1, 1.2, 1.3 etc. Now when you display the contents of the cart, sort by the Basket/Product ID concatenation and the basket will appear at the top of the list followed by all the items in it in the order they were added, then the next basket and so on:

1 - BASKET
1.1 - ITEM1
1.2 - ITEM2
1.3 - ITEM3
2 - BASKET
2.4 - ITEM1
2.5 - ITEM2
2.6 - ITEM3

etc....

Is that any good?

Regards

Owen.

---------------------------------------------------
Used programming books and web development software for sale (UK only):
www.tdsf.co.uk/Shop.htm

Multiple Parameter UD4 / Access 2000 Search Tutorial:
www.tdsf.co.uk/tdsfdemo/

Edited by - oeastwick on 20 Jan 2003 01:49:09

Reply to this topic