Help Version: 2.12
Last Update: 04/2/03

Cart Tracking

In order to allow shoppers add items to their cart and continue shopping, a temporary cart file is created for each shopper. In order to keep the association between the shopper and the cart file, one of two methods is required:

  • a session cookie
  • IP Address file

A session cookie is nothing more than a temporary cookie with their unique cart_id number in it. This cookie is not stored on the users computer. It's held in memory and gets deleted when they close the browser.

The IP address file is simply a file that has the ip address as the filename. Again, this ip address file has their unique cart_id number in it. This file gets deleted at checkout. In either case, we use this cart_id number to locate the users cart file when an item is added, modified, deleted, or the items in the cart are displayed.

By default, the store is configured to set a cookie for each shopper. This value is set in the configuration tab (Step 2 in the Main Menu) or qs_main under MISC_PARAMETERS. If USE_COOKIES is set to no, IP tracking will be used.

Because AOL uses what's called a floating IP, it may change during the duration of a shopping session. This is why we recommend using cookies for cart tracking. However, due to privacy settings, some browsers may have cookies disabled. An additional check for this can be made by setting TEST_FOR_COOKIES to yes. This allows IP tracking to be used if a cookie cannot be set in the users browser.

If testing for cookies, the line of code below will need to be added to the section of any template files that may be the first a shopper may enter: We recommend adding this line to a minimum of the database_multi_column.html, database_list_page.html, and database_product_page.html.

<meta http-equiv="Set-Cookie" content="cookies_enabled=yes; path-/;">

NOTE: This is already in the default template files in version 2.12.100 and above. However, we recommend adding it to any entrance page to your web site as well. This will ensure that this cookie is set when a user enters your site.

This will set a "cookies_enabled" cookie that tells the program that it's ok to use cookies to track the users cart. If the program does not see this cookie, it will automatically switch over to IP tracking.


Copyright 1997-2003 i-Soft, LLC