Results 1 to 3 of 3

Thread: Session Help!

  1. #1
    Join Date
    Apr 2004
    Posts
    27

    Session Help!

    Hello,

    Im trying to create a check-out for an engraving website.

    my session array:
    key=product, value=quantity, value=text to be engraved

    everythings cool until customers ordering same key(product) but different value as in different text to be engraved on same product line. This is permited, ordering two or more pens but with different engraving.

    the problem is that session would write over the same key value. How do i go about being able to take order of same key but different value and be able to write both into session?

  2. #2
    Join Date
    Jul 2004
    Location
    N29° 22.725' X W95° 6.452'
    Posts
    343
    That is a tricky situatioin. I would start by rethinking your ordering. Perhaps the text to engrave should be the key and the product a simple value since the text is what needs to be unique.

    Each new text to be engraved would indicate a new product since the engraving is what you are selling and the product is merely the means of delivering the engraving. And you can always change the quantity and type of product from within each new engraving.

    Well that is my take on it, I am sure there are other ways to accomplish what you are trying to do but that is how I would set it up. Hopefully this will at least get you thinking about it with a different spin on it.

  3. #3
    Join Date
    Mar 2002
    Location
    Denmark
    Posts
    684
    well maybe you could think about having an order id and having this as the key, as this would likly not change throughout the ordering process.. a customer might want to change the engraving text, changing the key =(.... but the order id would not change.. =)

    so the session array would look like this
    key=orderid, value=product, value=quantity, value=text

    tell us how it goes....
    ~Chris

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •