Welcome to WebmasterWorld Guest from 188.8.131.52
Forum Moderators: buckworks
What is the best way to track a visitor for a cart written in Perl? Is it cookies to store a basket number? Or is it better to store the basket details in a cookie?
>>What is the best way to track a visitor for a cart written in Perl?
>>Is it cookies to store a basket number? Or is it better to store
>>the basket details in a cookie?
so you wanna reinvent the wheel huh? and you wanna do it in perl??
whatever language you choose, use sessions (on the server) to store cart contents, and use one cookie to store the session (cart) ID in the browser. you may find it easier to build the cart in php or asp rather than perl as these provide much easier control of sessions (maintaining state). try downloading a few free carts to see how they do it.
if you need more information about maintaining state in perl, search for "maintining state perl" (the WDVL tutorial is quite good - follow it to the end to understand about maintaining state). for php or asp, search for "sessions php" or "sessions asp".
Which I why I chose Perl, portable, easy and I can program complex programs in Perl easily. It's only for basket add and basket display, the rest is done via standard html, not very dynamic, I know, but which search engine cannot index html files?
I'll go for the cookie cart ID idea then...