Help Version: 2.12
Last Update: 03/16/01

Editing The QuikStore Templates

The Quikstore template pages are standard HTML pages and can be edited by most any HTML editor. However, please keep in mind that you may need to edit some of the source code manually depending on the circumstances

Quikstore Tags

Each of the template pages have special variable tags. These variables may come from the server, the database file, the configuration files, or from the Quikstore program itself.

When a page is requested to do a specific function, like display the cart page, the quikstore program reads in the html code in the template page line by line. While it's reading the page, it looks for these special variable tags. When it finds one of them, it replaces it with the specific information from the program before it displays the page in the browser.

These special variable tags come in 3 basic formats:

  1. "session" tags

  2. "substitute" tags

  3. "break" tags

1. Session tags

Session tags are special tags that define the users session as they move from page to page. In Quikstore, these tags are defined in the HTML code using percent signs like this:

%%the_variable_name%%

Depending on their use, the session tags may also be in an HTML comment tag format like this:

<!--%%hidden_fields%%-->

Here is a list of some of the typical session tags used in the Quikstore templates:

 

Tag Name Description
%%cart_id%% The number used to track the contents of the users cart.
%%page%% The name of the previous page. This tells the program where to go back to when they are at the cart page or when an error occurs.
%%home_page%% This is the name of the page as defined in the store_front_page variable in the main configuration file.
%%web_site_url%% This is the web site URL as defined in the web_site_url variable in the main configuration file.
%%message%% Used on the redirect page to display a message to the user. It may be nothing more than "One Moment Please..." or it may be an error message depending on what was requested.
%%script_url%% This is the current URL for the quikstore.cgi script as defined in the script_url variable in the main configuration file.
%%secure_script_url%% This is the secure_script_url as defined in the main configuration file.
<!--%%hidden_fields%%--> This tag will be replaced by a group of hidden input tags depending on the requested function. 

When you search the database for instance, it might add a list of hidden variables for "category", "page", "search", etc. It will build this hidden field list depending on the given circumstance.

<!--%%hidden_cart_fields%%--> This tag gets replaced by the contents of the cart in hidden tags. It's used to forward the contents of the cart when you are posting to a remote secure server.
%%category%%
%%keywords%%
%%hits_seen%%
%%product%%
All of these tags are used when the user has requested a search. They hold the specific information as requested. These variables are passed throughout the system so that when the "Return to Product Page" button is clicked, the program takes the user  back to the place they came from.

 

2. Substitute tags

Substitute tags are variables that get replaced at runtime for things like database and cart fields. In Quikstore, these tags are defined in the HTML code using all upper case letters like this:

PRODUCT_ID
PRODUCT_NAME
ETC...

These types of tags are typically used on the database and cart template pages to display the product row or the cart fields. 

Substitute tags can also occasionally be in the HTML comment tag format depending on their use. These are used mainly for messages. The reason we use comment tags is so that they only get displayed if the given circumstance calls for them to display.

<!-- ITEM_ORDERED_MESSAGE -->
<!-- ERROR_TITLE -->
<!-- ERROR_MESSAGE -->

Typically, if the field comes from the database, cart file, or the configuration files, it would be used in the substitute tag (all upper case) format.

3. Break Tags

Break tags are used to define a section within a temple. These sections usually include the header, row, and footer sections of the page. Basically, the break tag tells the program where the header ends, the row begins and ends, and where the footer begins. This way the program can insert what's needed into the page when it's displayed to the user. 

The following tags are typical Break tags:

  <!-- END HEADER -->
  <!-- BEGIN PRODUCT ROW -->
  <!-- END PRODUCT ROW -->
  <!-- BEGIN FOOTER -->

Here's a example of how the break tags are used on a database page template. The header is in red, the row section in green, and the footer is in blue for demonstration proposes:

<HTML>
<BODY>
<TABLE>
  <TR> 
    <TH>Product Name</TH>
    <TH>Description</TH>
    <TH>Price</TH>
  </TR>
  <!-- END HEADER -->


  <!-- BEGIN PRODUCT ROW -->
  <TR>
    <TD>PRODUCT_NAME</TD>
    <TD>PRODUCT_DESCRIPTION</TD>
    <TD>PRODUCT_PRICE</TD>
  </TR>
  <!-- END PRODUCT ROW -->


  <!-- BEGIN FOOTER -->
</Table>
</BODY>
</HTML>

In the abbreviated database page example shown above, the Quikstore program will read the page in as three sections. The header, row, and footer. 

When it displays the page, it prints the header section including the start of the <TABLE> and the table headers first. Then it uses the "row" section of the page as many times as needed to display product rows from the database. Finally, the footer is displayed, closing out the table and the page. This is how a typical 3 section template is used by Quikstore. Of course, if any of the session or substitute tags are in one of the sections, they would also get replaced before the page is displayed.

NOTE: Be careful when modifying these pages.  Most all of the template pages contain variables that are replaced by the QuikStore program at runtime. If you edit any of the QuikStore variables, the QuikStore program may not function properly.

The shipping, credit card, and checkout pages all contain a discount section which is commented out by default.  The HTML between the '<!--DISCOUNT STARTS HERE' and 'DISCOUNT ENDS HERE-->' lines is displayed or commented out depending on whether you have entered discount logic in 'Step Four' on the 'Quikstore Main Menu'.  

Editing Templates Summary

The biggest thing to keep in mind while editing these pages is that they have special tags that get automatically replaced by the program at runtime. Also, most of the pages have more than one section to them. So, be careful about the Break tags. If the Break tags are removed or misplaced on the page, the page will not display properly. This may require you to manually edit the HTML code to get the tags back in the right place.

Continue to Encryption Tool

 


Copyright 1997-2003 iSoft-Solutions, inc.