home  ECOMMERCE NETSHOP  : IV Welcome Pages 

netShop
IV . The Welcome Pages

The first page you, and probably your customers, will see upon accessing the cart is index.html. Together with nocookie.html, this page functions as not only a "Welcome" page but also sets global values that the cart will use in the checkout and ordering steps. This document will cover the functions of these two files as well as how to add and modify the values that are set by these pages.

The Cart's Welcome Page - index.html

The index page, at first glance, seems to be a blank slate that you can edit to include a welcome message to your customers. Indeed index.html is quite useful for this, but it also does a few other things that aren't readily apparent.

All of these "hidden" functions occur in the link to the rest of the cart, which, by default, looks like this:

Click here to access the inventory.

If we look at the source of this page, specifically that of the anchor tag in the above sentence, you'll see this:

<a href="cart.cgi?test=main.shtml&link-to=nocookie.html&set-cookie:tax=0.05">here</a>

This link detects whether your web browser will accept cookies and if so, sets any global values (tax is the only one that appears in the default page) in a cookie. If your browser does not pass the cookie test, you get redirected to a page called nocookie.html.

Note: index.html can be bypassed if any external pages linking to your cart use the link above.

No Cookie For You!

Most visitors to your site will not access nocookie.html. However, those users with older browsers or those with cookie support turned off will arrive at this page. Lack of cookie support isn't the end of their adventures in your cart, however, as the cart can emulate cookies for them.

As with index.html, nocookie.html also sets any global cart values that you want:

<a href="cart.cgi?set-cookie:tax=0.05&link-to=main.shtml">here</a>

Adding or Modifying Values

As discussed above, both index.html and nocookie.html set global values that get used in the checkout and ordering steps of the cart and thus, if you need to change or add to these values, you must edit both of these pages.

Editing or adding values that get stored in the cookie is pretty easy. For example, to change the tax value from the default 5% (0.05) to 7.25% (0.0725), simply change the number value for in the bold text below:

From this:

cart.cgi?test=main.shtml&link-to=nocookie.html&set-cookie:tax=0.05

To this:

cart.cgi?test=main.shtml&link-to=nocookie.html&set-cookie:tax=0.0725

Adding new cookie values is just as simple. For example, to add a flat shipping rate of $5.00 to your cart, you'd include &set-cookie:shipping=500 in the link to the cart like so:

cart.cgi?test=main.shtml&link-to=nocookie.html&set-cookie:tax=0.05&set-cookie:shipping=500

Note: When modifying or adding cookie values, there are a number of pages that need to be edited to reflect your changes. The index.html and nocookie.html pages were covered in this document but checkout.shtml might need to be edited as well. The IC Tech. Ref. Doc. netShop - IV.The Checkout and Order Pages covers editing that page for this reason.

Related Items

Email and Web Hosting by Internet Connection 2004-2009 ©
Contact Us