Jump to content


Photo

array in a session


  • Please log in to reply
1 reply to this topic

#1 gerkintrigg

gerkintrigg
  • Members
  • PipPipPip
  • Magician
  • 828 posts
  • LocationBristol, UK
  • Age:37

Posted 26 August 2006 - 06:02 PM

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: http://magic2k.com/s...pen=1&itemid=55

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,
Neil Trigger - http://www.ghostlypublishing.co.uk - Ghostly Publishing - Children's Fantasy Books

#2 gerkintrigg

gerkintrigg
  • Members
  • PipPipPip
  • Magician
  • 828 posts
  • LocationBristol, UK
  • Age:37

Posted 26 August 2006 - 08:31 PM

To clarify, can i expand an array, by just adding values to an identifier?
Neil Trigger - http://www.ghostlypublishing.co.uk - Ghostly Publishing - Children's Fantasy Books




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users