Coldfusion Shopping Cart

Discussion in 'Programming' started by forumposters, May 15, 2007.

  1. #1
    I'm building a shopping cart in Coldfusion. Anyone have advice and tips as I get started with this? Any good tutorials for any part of a good shopping cart application? Any direction or code snippets you can share would be much appreciated.
     
    forumposters, May 15, 2007 IP
  2. IsRoss()

    IsRoss() Peon

    Messages:
    116
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I normally use a session based structure that holds all user and session information, as well as the cart contents.

    Don't be afraid to use <cftransaction> liberally.
     
    IsRoss(), May 15, 2007 IP
  3. forumposters

    forumposters Peon

    Messages:
    270
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Do you use an array of structures?
    And, why would you use a session variable rather than a client variable for cart content info?
     
    forumposters, May 17, 2007 IP
  4. IsRoss()

    IsRoss() Peon

    Messages:
    116
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Depending on your CF Admin setting, Client variables could be stored in a client side cookie, while session vars are stored in a session cookie. Most shared hosting companies use this setting (the other options are in the windows registry, or in a database)

    If the user does not accept cookies and that is your setting for client vars, then the application will not work for them. One benefit of using client cookies, though, is that the cart will remain populated if the visitor comes back on another day...

    I use a structure that includes an array for cart items.
     
    IsRoss(), May 17, 2007 IP