SurfShopCart Documentation

Setting Up Shop Has Never Been Easier!

User Tools

Site Tools


Customizing Output

Once you are familiar with the system, you may begin to customize the output templates. SurfShop™ uses a special system of “Templates,” “Parameters” and “Place Holders” to generate the output.

Output Terms

Templates are HTML files which are read by SurfShop™ and combined with data to form the output.

Place Holders are HTML comment tags that are read by the program to do different things. They look like this:

<! Place_Holder>

Most of the time, Place Holders will simply display specific values generated by SurfShop™. In some cases, they will do more exciting stuff, like generate search results or restrict access to sections of your store. SurfShop™ Place Holders do not use the double-dash, like regular comments. A single space after the exclamation point is required to identify it as a SurfShop™ Place Holder.

Parameters are form data fields which have special meaning to the program. If you are not familiar with “form-data” and “form fields,” please read Web Essentials.

You may re-design the templates however you like, but be warned that changing the various form parameters and placeholder may create unexpected results, and may even make the system stop working correctly.

For a complete listing of SurfShop™ Place Holders and Parameters, read Parameters and Place Holders.

SurfShop™ uses a special place holder, <! imageurl>, to generate a URL which will change for secure and non secure protocol. Try using this instead of a hard wired address:

<img src="<! imageurl>/images/thispicture.gif"> 

Customizing the E-mail Messages

You can customize the messages that are sent when an order is placed using the E-mail Admin. The defaults will generate a confirmation of the order that should work for most stores, however, you may wish to add or remove specific information from the default installation.

In some cases, the e-mail template files may unpack incorrectly, resulting in double-spaces. This may cause some of the fields to appear blank on the admin page. Check to be sure that each field contains a value. A screen shot of a correct email configuration is shown below.

The confirmation e-mail can contain links to downloadable payloads as well as usernames and passwords for purchased gift certificates. In order to enable these features, you mut include specific SurfShop™ place holder tags.

Payload Links: <! dllinkmail>
Gift Certificates:<! GiftCertOutput>

Customizing the Output Message File (msgs.dat)

The “msgs.dat” file in your data directory contains all of the text output used by the system. You may customize this file at any time, especially to customize for non-US websites; however DO NOT CHANGE THE SEQUENCE OR POSITION OF ANY OF THE LINES. Each line has a specific purpose to the script.

If you decide to modify any of the default SurfShop™ output files, PLEASE CREATE A BACKUP FIRST.

Customizing for Non-US Websites

SurfShop™ is designed to be used with any currency in any country (that uses the iso-8859-1 western character set). TRANSLATION INTO NON-ENGLISH LANGUAGES AND NON-US CURRENCY MUST BE DONE MANUALLY. At this time there are no pre-configured Non-US data sets.

  1. In autoconfig.cgi, customize the Currency Symbol, Currency Precision and Location of Currency settings
  2. Rewrite the output message file (msgs.dat) in new language. Note that some text cannot be changed, as it is used by the program.
  3. Modify each of the template files in the new language, including the currency symbol(s) where necessary. Be careful not to change the various Place Holders that are embedded in the code.

Conversion Parameters and Place Holders

You may use the conversion multiplier parameter and the various conversion Place Holders to simultaneously translate in to two forms of currency. You will need to modify the templates to display the converted amounts along with the amounts calculated by default. Almost all of the amounts that are calculated by default have a counterpart which is calculated by the conver-sion multiplier. Each is listed in the “Place Holders & Parameters Index.”


Multiplier passed to shop.cgi to convert standard currency output into a second foreign currency.


<input type=hidden name=conversion value=".725">


Value passed to shop.cgi specifying the number of decimals to display con-verted amounts.


<input type=hidden name=conv_prec value="0">

Displaying Converted Calculations

Currency conversions are obtained by including the “conv_” prefix in a calculation placeholder. The appropriate currency symbol must be hard wired into the template displaying the value.

<! conv_itemtotal> result of itemtotal times the value of the “conversion” parameter
<! conv_[calc_name]>result of [calc_name] times the value of the “conversion” parameter
<! conv_totalother> result of totalother times the value of the “conversion” parameter
<! conv_subtotal> result of subtotal times the value of the “conversion” parameter
<! conv_chargetotal> result of chargetotal times the value of the “conversion” parameter
<! conv_shipcost> result of shipcost times the value of the “conversion” parameter

Changing Template Regions

If you decide to modify any of the default Surf Shop output files, PLEASE CREATE A BACKUP FIRST.

SurfShop™ uses special comment tags to identify regions updatable by the WebStore Admin. Template regions look like this:


You can move these regions to any position on a template page, provided you move BOTH THE BEGIN AND END TAGS.

We do not recommend you altering any of the administrative templates, as they contain regions that affect the program operation. In addition, tags named “OPTIONS” must remain at the top of the respective page, as they must load first to correctly administer the rest of the template.

Using Images on a Remote Server

You can override the default image display option which uses the <! imageurl> placeholder by replacing the place holder with an absolute URL to the image in each of the output templates.

This will disable SurfShop's ability to display images interchangeably between the https and http protocols.

  • Do this if 1) you are not planning to display any images using https 2) store your images on a remote server.

You will need to “find and replace” the string <! imageurl> with the URL to your remote image server. If you have different URLs for each image, you will need to manually insert the new path.

The template files affected are:


Additionally, this will affect the back-end admin image display. Although not critical to the system, it may cause the header and other graphics to appear as broken links when you use the admin pages via https. You can modify these templates as well.


<<Main_Page Top^

customizing_output.txt · Last modified: 2018/07/03 04:55 (external edit)