Jump to content

array in a session


gerkintrigg

Recommended Posts

I've written my own shopping cart system and it's using an array to keep a track of the contents of the cart.

I also have started extending the functionality of this cart by writing a script for the admin section, whereby the administrator can add options to the item like colour, size, material etc. These options are entirely dynamic and the amount of options can change. Eg: item #1 might have 3 sets of options, whereas item #2 might not have any, and item # 3 might only have one set of options. For a "working example" please visit: [url=http://magic2k.com/shop/index.php?cat_open=&open=1&itemid=55]http://magic2k.com/shop/index.php?cat_open=&open=1&itemid=55[/url]

My question is this:

When I click on "Add to Cart", what's the easiest way of recording the various options against the shopping cart contents?

I also have a potential problem of a customer ordering a blue deck of cards and a red deck of cards. this would currently display as 2 decks of cards.

Can anyone suggest a way around this?

I hope i explained myself adequately.

Thanks,
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.