System Administrator's Guide Zelerate: AllCommerce
Appendix C: Templates and Cell File Examples
welcome.cgi Templates And Cell Files
Here are minimal examples of the templates and cell files needed by welcome.cgi.

HTML Sample for page_welcome_login.txt
   <HTML><!-- page_welcome_login.txt -->
      <HEAD>
         <TITLE>Please Sign In to __storename__ </TITLE>
      </HEAD>
      <BODY BGCOLOR="FFdd66" link="#330000" vlink="#333300"
         marginheight="0" marginwidth="0" leftmargin="0"
         topmargin="0">
         <FORM METHOD="POST" ACTION="/cgi-bin/om/__scriptname__">
         <INPUT TYPE="hidden" NAME="pg_targ" VALUE="__pg_targ__">
         <INPUT TYPE="hidden" NAME="sid" value="__sid__"><br>

         <TABLE><TR colspan=4 BGCOLOR="#AAAAAA" WIDTH=300>
            <TD>My site Login</TD></TR>

            __cell_welcome_new_cust_300__

            __cell_welcome_return_cust_300__

         </TABLE>
         </FORM>
      </BODY>
   </HTML>     

HTML Sample for page_welcome_onwards.txt
   <HTML>
      <HEAD>
         <TITLE>__storename__ Login Success</TITLE>
      </HEAD>
      <!-- page_welcome_onwards.txt -->
      <BODY marginheight="0" marginwidth="0" leftmargin="0"
         topmargin="0"> <BR>
         <TABLE cellspacing="0" cellpadding="0" BORDER=0
            align="center">
            <TR>
               <TD>
                  <B>You are now logged in to __storename__  Remember to
                  close your browser when you leave your machine
                  unattended!</B>
                  <P>Account name:<B>__EMAIL__</B>
                  <P>Please continue</TD>
            </TR>
            <TR>
               <TD><A HREF="__pg_targ__">Continue</A></TD>
            </TR>
         </TABLE>
      </BODY>
   </HTML>        

HTML Sample for page_welcome_confirm.txt
   <HTML>
      <HEAD>
         <TITLE>__storename__ | Account created</TITLE>
      </HEAD>
      <!-- page_welcome_confirm.txt-->
      <BODY>
         <TABLE cellspacing="0" cellpadding="0"
            BORDER=0 align="center">
            <TR>
               <TD><B>Account created</B>
                  <B>Congratulations on setting up your
                  new __storename__ account!</B><P>
                  You have created an account
                  with __storename__ using the following
                  information:/TD></TR>
            <TR><TD>  Account name:<B>__EMAIL__</B></TD></TR>
            <TR><TD>Password: <B>__PASSWD__</B></TD>
               <TD>Please write this information down or print
               out this page and keep it in an empty ice cream
               container in your freezer.</TD>
            <TR><TD><A href="/html/__pg_targ__">Continue</A></TD>
            </TR>
         </TABLE>
      </BODY>
   </HTML>

hint.cgi Templates for Cells

HTML Sample for page_hint.txt
   <HTML>
      <HEAD>
         <TITLE>__storename__  | Your password hint</TITLE>
      </HEAD>
      <!-- page_hint.txt -->
      <BODY link="#330000" vlink="#333300" marginheight="0"
         marginwidth="0" leftmargin="0" topmargin="0">

         <FORM METHOD="POST" ACTION="/cgi-bin/om/hint.cgi">
         <INPUT TYPE="hidden NAME="pg_targ"
            VALUE="__pg_targ__"> <input type="hidden"
            name="sid" value="__sid__"> <BR>

         <TABLE cellspacing="0"
            cellpadding="0" BORDER=0 align="center">
            <TR>
               <TD><B>Forgot My Password</B></TD>
               <TD>I can't remember my password.
               Please tell me what my hint is?</TD>
            </TR>
            <TR><TD>
                  <TABLE BORDER=0 cellspacing="0" cellpadding="0">
                     <TR> <TD>__HINT_err__<B>Your email address:</B>
                        (user@domain.com)<BR></font></TD>
                     </TR>
                     <TR> <TD>__EMAIL_err__<BR>
                        <INPUT TYPE="text" NAME="EMAIL_inp"
                           VALUE="__EMAIL_inp__" SIZE="20"></td>
                        <td align=middle><INPUT TYPE=submit value="submit"></TD>
                     </TR>
                     <TR><TD>
                        <a href=/cgi-bin/om/welcome.cgi?pg_targ=__pg_targ__>
                        I'm now ready to login.</a></TD>
                     </TD> </TR>
                  </TABLE>
               </TR>
            </TABLE>
         </FORM>
      </BODY>
   </HTML>   

cart.cgi Templates and Cell Files

Here are minimal examples of the templates and cell files needed by cart.cgi.

HTML Sample for page_shopping_cart_v1.txt
   <HTML>
      <HEAD>
         <TITLE>__storename__ | My shopping cart</TITLE>
      </HEAD>
      <!-- page_shopping_cart_v1.txt PM -->
      <BODY link="#330000" vlink="#333300" marginheight="0" 
         marginwidth="0" leftmargin="0" topmargin="0">

         <FORM METHOD=post action=/cgi-bin/om/cart.cgi>
         <input type="hidden" NAME="pg_targ" VALUE="__pg_targ__">
         <input type="hidden" name="sid" value="__sid__">
         <input type="hidden" name="vcode" value="__vcode__">
         <input type="hidden" name="AXIS1_inp" value="__AXIS1_pre__">
         <input type="hidden" name="AXIS1_pre" value="__AXIS1_pre__">


         <TABLE BORDER=0 WIDTH=300 CELLSPACING=0 CELLPADDING=3>
            <TR>
               <TD collspan=3><FONT face="verdana,geneva,arial,helvetica"
                  color="#999933">
	               <B>My Cart</B></FONT><BR></TD>
            </TR>

            __newrow_cell_cart_300_header__
            __newrow_cell_cart_300_list__
            __newrow_cell_cart_300_buttons__

            <TR><TD colspan=3>
                  <FONT FACE="arial,helvetica,san-serif" SIZE=-1 color="#999933">
                  To change a quantity, enter the <b>new quantity</b> and
	               press the update button.<BR>To remove an item, select the
	               checkbox next to <b>remove</b>and press the update
	               button.</font>
 	         </TD></TR>
         </TABLE>
         <TABLE BORDER=0 WIDTH=300 CELLSPACING=0 CELLPADDING=3>
            __cell_cart_300_header__
            __cell_cart_300_list__
            __cell_cart_300_subtotal__
            __cell_cart_300_buttons__
         </TABLE>
         </FORM>
      </BODY>
   </HTML>      	

HTML Sample for cell_cart_300_header.txt
	<!----- Titles of columns ------------------------------------>

   <TR>
   <TD><FONT face="verdana,geneva,arial,helvetica" color="#999933" size=-1>
		<b>Product</b></font><BR>
	<IMG SRC="/images/general/dot.gif" WIDTH=140 HEIGHT=1></TD>
	<TD><FONT face="verdana,geneva,arial,helvetica" color="#999933" size=-1>
		<b>Price</b></font><BR>
	<IMG SRC="/images/general/dot.gif" WIDTH=40 HEIGHT=1></TD>
	<TD><FONT face="verdana,geneva,arial,helvetica" color="#999933" size=-1>
		<b>Qty.</b></font><BR>
	<IMG SRC="/images/general/dot.gif" WIDTH=40 HEIGHT=1></TD>
	<TD ALIGN=MIDDLE><FONT face="verdana,geneva,arial,helvetica" color="#999933" size=-1>
	<b>Remove</b></font><BR>
	<IMG SRC="/images/general/dot.gif" WIDTH=60 HEIGHT=1></TD>
	</TR>

HTML Sample for cell_cart_300_list.txt
	<TR>
	<TD><A HREF="/html/__VSKU__.shtml"><FONT FACE="arial,helvetica,
		san-serif" SIZE=-1>__TITLE__
	 </FONT></A><BR>
	<FONT FACE="arial,helvetica,san-serif" SIZE=-2 color="#FF0000">
	__QUANT_err__</FONT>
	<FONT FACE="arial,helvetica,san-serif" SIZE=-2>
	Sku number:__VSKU__</FONT></TD>
 	<TD>$__UNITPR__</TD>
	<TD ALIGN=MIDDLE>
	<INPUT TYPE="text" NAME="row.__ROWID__.QUANT_inp" SIZE="3"
	 VALUE="__QUANT__">
	<INPUT TYPE="hidden" NAME="row.__ROWID__.QUANT_pre" SIZE="3"
	 VALUE="__QUANT__">
	<INPUT TYPE="hidden" NAME="row.__ROWID__.SKU" SIZE="3"
	 VALUE="__SKU__">
	<INPUT TYPE="hidden" NAME="row.__ROWID__.VCODE" SIZE="3"
	 VALUE="__VCODE__">
	<input type="hidden" name="row.__ROWID__.VSKU" SIZE="3"
	 VALUE="__VSKU__">
	</TD>

	<!----- Shopping List Checkbox --------------------------->

	<TD ALIGN=MIDDLE><input type=checkbox name=row.__ROWID__.kill
	   value="on"></TD>
	</TR>     

The first bit of data, the hyperlink, provides a link back to the product page. __QUANT_err__ is replaced with an error message if there is one, this would happen if a customer attempted to put more of one item in their cart than is allowed per the store_limit_all or store_limit_jit variables in store.pm. __VSKU__ is replaced with the product's sku with a variant code appended if the product has variants (see Product Variants for details). __VCODE__ is for the variant code itself.

search.cgi Templates

HTML Sample for page_search_123.txt

The only template required for search.cgi, page_search_123.txt is fairly simple. It just has to be there so search.cgi has some template on which to display its results. You can use any template you wish to design therefore, as long as you include a cell reference within it. So somewhere in your page_search_123.txt you will need:

__column_215_1__

This should be within a table, and increment the last digit (# 1) here, for each column you add.

HTML Example for cell_215_80_int.txt
Here is an example from the sample store "presents".

	<TR>
	 <TD><TABLE WIDTH=215 CELLSPACING=0 CELLPADDING=0 BORDER=0>
	<TR>
	 <TD WIDTH=80 VALIGN=TOP>
	 <A HREF="/html/__SKU__.shtml"><IMG SRC="/images/products/80/
	  __SKU___80.jpg" WIDTH=80 HEIGHT=80 BORDER=0 ALT="__TITLE__"></A>
	 </TD>
	 <TD WIDTH=10><IMG SRC="/images/general/dot.gif" WIDTH=10 
	    HEIGHT=1></TD>
	 <TD WIDTH=125 VALIGN="top">
	 <FONT FACE="arial,helvetica,san-serif">
	  <A HREF="/html/__SKU__.shtml"><B>__TITLE__</B></A></FONT>
	 <BR>
	 <FONT FACE="arial,helvetica,san-serif" SIZE=-1>
		__BRIEF__</FONT></TD>
	</TR>

	<TR>
	 <TD COLSPAN=3><IMG SRC="/images/general/dot.gif" 
	     WIDTH=215 HEIGHT=10></TD>
	</TR> 
	</TABLE></TD>
	</TR>

This cell includes a reference to the products image, but this is not necessary.
Prev
Appendix B: AllCommerce Configuration Files
Up Next
Appendix D: Credit Card Verification System (CCVS)
All Commerce User's Guide Table of Contents