Welcome to WebmasterWorld Guest from 54.221.87.97

Forum Moderators: buckworks

Message Too Old, No Replies

How to create my own shopping cart

What's the best way to track visitors?

     

gsx

9:21 pm on Aug 27, 2002 (gmt 0)

10+ Year Member



I am currently using a JavaScript shopping cart, using frames. The parent frame holds the basket variables.

I want rid of the JavaScript. I want rid of the frames.

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?

Crazy_Fool

12:58 am on Aug 28, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>>I want rid of the JavaScript. I want rid of the frames.

good moves

>>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".

gsx

9:23 am on Aug 28, 2002 (gmt 0)

10+ Year Member



Thanks, but I don't have access or any knowledge about php or 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...