#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Posts
    4
    Rep Power
    0
    Can anyone out there get me started on a good layout scheme for a good shoppping cart? I have seen them from 100% JavaScript to 100% CGI. I have a couple features requested like persistant display of the shopping cart contents or a mouseover popup to display contents which leads me to think that the data should be maintained client side (?)

    Should (or can) the chosen items be set in a cookie or maintained on the server side? Bear with me a little here I havent done much web programming .

    Thanks!
    Daari

  2. #2
  3. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    Perth West Australia
    Posts
    757
    Rep Power
    15
    cookies can only hold so much data, if you have access to a DB of any description - use it!, you can display the contents of the cart by a query from the DB or by passing ifo from page to page in the query string or better still via hidden form fields. But the database certainly gives you more options.

    But first things first, what languages do you have available? - I am assuming you have PERL, what about PHP (my vote) or ASP (even cold-fusion if you are desperate) & what DB do you have access to , you can even use text files to store cart info although this rules out javascript.

    But anyway - IMHO serverside/CGI is a must.

    ------------------
    Simon Wheeler
    FirePages -DHTML/PHP/MySQL
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Posts
    4
    Rep Power
    0
    I am sure it will require both Javascript and CGI. What I am trying to avoid is reloading the page every time a user clicks add to cart as this particular website has lots and lots of small really cheap items and purchases usually have 10s of items in them. I am considering the followin scheme:

    Server side flat file has "database" of product informatin (price descrip part_no thumbnail_filename fullsize_filename etc). Pages are generated via CGI with the items on it and the complete db is loaded into some Javascript array (size limits?). Cookies store only the part_no and quantity of that which has been placed in cart.

    Mouseover functions can popup a window with the current cart contents and mouseoff destroys the popup.

    I am considering Tripod as the web owner does not wish to spend any money on this venture (more fun than anything I think). Therefore I have no DB and only "Tripod" Perl for CGI. Also no sendmail but "Tripod" mail (easy to use but no canned cart script anywhere works with it).

    Also, I am using this to learn the art . I have so far spent a week researching Javascript and have a bit of CGI exp. Does this scheme present any problems anyone can think of? The product database is relatively small (I think maybe 200-300 unique items).

    Thanks for the help so far
    Daari

IMN logo majestic logo threadwatch logo seochat tools logo