Zelerate AllCommerce 1.0.4 Documentation

11. Overview of Cookieless Shopping (wrapper.cgi)

11.1 Functionality

wrapper.cgi, the cookieless shopping script, is invoked by inbound.cgi when the web browser does not accept a cookie, so that shopping can continue.

Wrapper gets the page contents from the apache server and rewrites the links to pass through the wrapper and display on the contents on the browser.

The 3 major functions are FixLinks, InsertEntry and Load_Module

  1. FixLinks - Rewrite links to pass through wrapper

  2. InsertEntry - Write information about the pages visited in the clicks table.

  3. Load_Module - Load LWP::UserAgent and exit gracefully with an appropriate error message if not found

11.2 Requirements

Wrapper uses LWP::UserAgent. To get it working, the following packages have to be installed.

  1. URI

  2. HTML::Parser

  3. MIME::Base64

  4. Digest::MD5

  5. libwww-perl

These packages can be obtained from http://www.linpro.no/lwp or CPAN.

11.3 Testing

General guidelines

  1. Configure web browser to not accept cookies or to prompt for cookies which you don't accept. On recent Netscape browsers that is the Edit->Preferences option. Then select Category Advanced. You will see the Cookies options.

  2. You should either see your site with all your links passing through wrapper or an error message on the browser with an appropriate error message.

  3. Go through the entire checkout process, check to see all links pass through wrapper.

  4. Check entries in sessions and clicks tables.

11.4 Limitation

  1. Wrapper reads one line at a time and rewrites links to pass through it, hence it arises a lot of limitations. Care is required while creating or modifying templates. Shown below are classical examples, which are not handled by wrapper.

    1. HREF= "12-AA.shtml" --- Extra space

    2. HREF = "12-AA.shtml" --- Extra space

    3. HREF="12AA.shtml" --- Hardcoded in digit-char format

    4. HREF="12-AA.html" --- Hardcoded to shtml

    5. HREF=12-AA.shml --- NO "

    6. FORM METHOD=POST
      ACTION="/cgi-bin/om/search.cgi"
      --- Need to be on the same line

    7. FORM METHOD=POST ACTION="/cgi-bin/om/search.cgi" --- Extra space between POST and ACTION

  2. HTTPS requests are handled as HTTP