uk shopping cart solution  
 
Read Get Trolleyed's reviews
HOME PRODUCTS FEATURES DESIGN HOSTING RESELLERS TERMS SUPPORT CONTACT
 

Search for

Templates

Previous / Contents / Next

Where do I find my templates?

You can find your templates in two ways:

  1. By FTPing into your site and going to the /public_html/shop/html_templates/ folder.
  2. Through a web browser and going to http://www.domain.com/shop/html_templaets/ (where www.domain.com is your site's domain name).
You will find several template sets in these folders.


What are the Get-Trolleyed templates?

The templates for Get-trolleyed are standard webpages with some comment or 'pseudo' tags (that are hidden when browsed in a web browser). These Tags are replaced and filled with information that Get-Trolleyed gets from your product database and admin system.


How do I edit my templates?

You can do this in several ways, first of all make sure that you have FTPed your templates to your local machine. You can edit them by using an HTML editor (eg: Dreamweaver, GoLive, etc).

NB: Get-Trolleyed can NOT provide any support for the editor that you are using, if you need help with your HTML editor then please see it's help files or contact their support team.


What are the common 'Pseudo' Tags used in Get-Trolleyed?

<!--script_message-->
This tag shows where to display messages from the cart script. For tpl_cart.htm, this can be the checkout, terms or view cart pages. For other templates, it could be for error messages, or for showing that a product was added to the cart.

<!--contents-->...<!--contents-->
Where to display the script generated contents menu. This menu consists of links to:

  • all 'top level' shop pages - ie, those that have the trolleyed shop home page as their parent in the shop page structure.
  • special offers
  • home page
  • view/complete order
  • news page (if enabled)
  • feedback page (if enabled)
  • terms and conditions - based on terms entered in the global vars admin section.

<!--footer-->...<!--footer-->
Where to display the script generated footer. The footer consists of the following elements, defined on the shop setup admin page:

  • the elements selected for display in the shop attributes section
  • the links added in the global links section


tpl_addprod.htm

This template is used to show a shopper that a product has been added to their cart.

It is not a whole web page. This template is inserted into the page the shopper was on when they clicked the 'add to cart' button.

The template must include the markers:
#product_name#
#quantity#
#unitprice# - Inc/Ex VAT unit price of product - depends on whether your catalogue prices are listed Inc/Ex VAT
#total# - #quantity# x #unitprice#
#country# - country select tag
#postage# - postage select tag

It can also contain the markers:
#vat_no# - VAT number input, if applicable
#product_options_html# - if any of your products have options
#viewcart_url# - link to shopping cart
#associated_products# - displays associated products link, if any set


tpl_cart.htm

This is a general purpose template page. Any time the script needs to display a page of generated information, this template is used. It is also used to display the contents of the templates tpl_addprod.htm, tpl_checkout.htm and tpl_viewcart.htm.

The template must include the tag:
<!--script_message-->

It can also contain the tags:
<!--contents-->...<!--contents-->
<!--footer-->...<!--footer-->


tpl_checkout.htm

This template generates the form that captures the shopper's shipping information and their chosen method of payment.

Once again, it is not a full HTML page. The checkout template is displayed within the tpl_cart.htm template when presented.

It must contain a <FORM>...</FORM> tag (rather than a pseudo tag - so you can preview the form in your browser), and this form must contain the fields outlined below. See the sample templates for clearer examples.

You must not change the names of the fields supplied in the demo template sets - they are used to pass information to the relevant payment system.

first_name and last_name - The customer's name. The shopping script will automatically build a #customer_name# element from these (useful if you want to make your templates tidier).

email - The customer's e-mail address.

shipping address - Use the fields address1, address2, city, county and postcode (country already selected) to solicit the user's shipping address.

#payment_method# - Marker that is replaced with radio buttons for all payment methods enabled.

submit button or image - This allows your customers to proceed with their purchase

other fields/markers - You can add other fields to this form as necessary, either as inputs, textareas or selects. You will most probably want to include fields that collect the customer's:

  • telephone number - useful for querying problems
  • title - Mr/Mrs/Ms/Rev/Whatever
  • gift wrap checkbox - could the order be a present?
  • 'message on card' - eg, for flower deliveries

checking inputs
GT can check the value entered for each input, to see that it fulfills the criteria for that input. For each input that you want checks made on, add the element VARCHECK to that input tag. If you wish GT to perform more than one check, separate checks with commas - eg "required,email". The checks GT can make are:

  • required - the field must not be empty
  • number - if entered, the field must contain a number. Other characters can also be included, allowing this to be used for very rough checks on telephone numbers (for example)
  • email - if entered, the field value must be a valid e-mail address
  • integer - if entered, the field must be an integer
  • gtD - field value must be greater than the value D, where D is a number
  • ltD - field value must be less than the value D, where D is a number.
  • length_gtL - field length must be greater than L characters long, where L is a positive integer.
  • length_ltL - field length must be less than L characters long, where L is a positive integer.
If the criteria chosen for a field are not fulfilled, the form is re-presented, along with any relevant error messages.


tpl_home.htm

This template is used to generate the "home" page of your shop, (usually found at trolleyed/index.htm or shop/index.htm).

The page must contain <!--script_message--> to show where to display informational/error messages.

The page may also contain:

  • <!--contents-->...<!--/contents--> - shop contents links marker
  • <!--search_text-->...<!--/search_text--> - search box
  • <!--page_intro-->...<!--/page_intro--> - page introduction
  • <!--page_header-->...<!--/page_header--> - page header - in H1 text
  • <!--footer-->...<!--/footer--> - page footer
  • <!--special_offers-->...<!--/special_offers--> - special offers that have been marked to display on home page

If you are including the <!--special_offers--> tag, it must contain a <!--offer-offerid-->...<!--/offer-offerid--> tag to define an individual offer, and this must contain the following:

  • <!--hookline-->...<!--/hookline--> - offer 'hook' line
  • <!--hookcopy-->...<!--/hookcopy--> - offer description


tpl_news.htm

Used to define news article layout. Once again, not a whole page, just an HTML fragment.

This template is optional. If you omit it, the system uses a default layout, and a default display of headline, date and one paragraph.

If using this template, it must contain:

  • #headline# - where to display the headline of the article
  • #date# - where to display the date the article was posted/amended
  • #article_copy_textarea# - this is where your news article appears


tpl_offers.htm

This template is used to generate the special offers page.

The page must contain the tags:

  • <!--script_message--> to show where to display informational/error messages
  • <!--special_offers-->...<!--special_offers--> - defines the special offers section

The <!--special_offers-->...<!--special_offers--> pseudo tag must contain a <!--offer-offerid-->...<!--/offer-offerid--> tag that defines an individual offer. This must contain:

  • <!--hookline-->...<!--/hookline--> - the offer's 'hook' line (title)
  • <!--hookcopy-->...<!--/hookcopy--> - the main description of the offer

The page may also contain:

  • <!--contents-->...<!--/contents--> - shop contents links marker
  • <!--search_text-->...<!--/search_text--> - search box
  • <!--footer-->...<!--/footer--> - page footer


tpl_popup.htm

If you are using product pop-ups, you can create a template to define how the product pop-up is displayed. If you don't create a pop-up template, a default layout is used.

It is a complete HTML page, and must contain the following within the <HEAD>...</HEAD> part of the HTML

<!--javascript-->
<!-- please don't delete me!-->
<!--/javascript-->

The page must also contain a <!--product-prodid-->...<!--/product-prodid--> pseudo tag. This tag must contain the following:

  • <!--product_name-->...<!--/product_name-->
  • <!--prod_price-->...<!--/prod_price-->
  • <!--order_button-->...<!--/order_button-->

If any products contain options, it must include:

  • <!--options-->...<!--/options-->

It may also contain:

  • <!--product_name_id-->...<!--/product_name_id-->
  • <!--image-->...<!--/image-->
  • <!--quantity-->...<!--/quantity-->
  • <!--description-->...<!--/description-->
  • <A HREF="javascript:self.close()">Close Window</A> - or similar (a close window link)

Other options to do with the size of the pop-up window and when to use it are set in the program setup section.


tpl_shop.htm

This template is used to generate the pages that form the bulk of your shop - the product pages.

The page must contain the following tags:

  • <!--script_message--> - Used to display messages from cart, and the populated tpl_addprod.htm template when the shopper adds a product to their cart.
  • <!--product-prodid-->...<!--/product-prodid-->

This tag must contain tags for the following elements:

  • <!--prodname-->...<!--/prodname--> - product name
  • <!--prod_price-->...<!--/prod_price--> - product unit price
  • <!--order_button-->...<!--/order_button--> - "Add to cart" button

The tag can (and probably should) also contain the following:

  • <!--prodnameid-->...<!--/prodnameid--> - product id
  • <!--description-->...<!--/description--> - product description
  • <!--special_offer-->...<!--/special_offer--> - special offer hookline
  • <!--options-->...<!--/options--> - if some of your products have options, show where you want them displayed
  • <!--quantity-->...<!--/quantity--> - the quantity input - if omitted, one of the product is added to cart when the shopper clicks the "Add to cart" button
  • <!--image-->...<!--/image--> - if you have product images, show where you want them to appear.

The template can also contain:

  • <!--tree_path-->...<!--/tree_path--> - Marker to show where to display the location of the page within the site's structure.
  • <!--page_name-->...<!--/page_name--> - Marker to show where to display the name of the page.
  • <!--sub_page_links-->...<!--/sub_page_links--> - Marker to show where to display links to child pages.
  • <!--split_page_links-->...<!--/split_page_links--> - Marker to show where to display links to split pages.
  • <!--back_to_top-->...<!--/back_to_top--> - Marker to show where a Back to Top of the page link should be shown.
  • <!--page_intro-->...<!--/page_intro--> - page introduction
  • <!--page_header-->...<!--/page_header--> - page header - in H1 text
  • <!--contents-->...<!--/contents--> - page contents menu marker
  • <!--footer-->...<!--/footer--> - page footer marker
  • <!--search_text-->...<!--/search_text--> - search box


tpl_viewcart.htm

This template is used to show a shopper their cart's contents. It is used on both the view cart page and on the following checkout page.

It is not a whole web page. This template is inserted into the tpl_cart.htm page when used.

It may seem a little complicated, so look at the example templates to get a better idea about it's workings...

It must contain the following:

  • <!--view_cart-->...<!--/view_cart-->

Place within this tag (it can appear several times) HTML you want the shopper to see when they view their cart. These items are not displayed on the following checkout page.

It must include the 'Recalculate' and 'Checkout' buttons, and to allow the shopper to select their postage type, VAT No (if applicable) and their country. So the page must include:

  • either a submit button or image for recalculate (calculate changes made to quantities and re-present table)
  • either a submit button or image for checkout (proceed to the checkout form)
  • the marker #postage# to indicate where to place the postage select tag

The HTML you must use for each of the buttons/images is:
Recalculate Button

<INPUT TYPE="SUBMIT" NAME="action" VALUE="recalculate">

Recalculate Image

<INPUT TYPE="IMAGE" NAME="recalculate" SRC="...">

Checkout Button

<INPUT TYPE="SUBMIT" NAME="action" VALUE="checkout">

Checkout Image

<INPUT TYPE="IMAGE" NAME="checkout" SRC="...">

If using images, replace "..." with the absolute URL of the relevant image button.

If you want to include product information in your checkout pages then you must include this tag:

  • <!--product_row-->...<!--/product_row-->

This tag contains information about how to display details of each product in the cart.

We recommend you make this a table row (and use the same structure for the following <!--offer_row--> tag), but there's no reason why you can't radically change this to suit your own tastes.

This tag must contain:

  • #product_name#
  • #quantity#
  • #ex_tax_unitprice# and/or #inc_tax_unitprice#
  • #ex_tax_unitprice_total# and/or #inc_tax_unitprice_total#

This tag may also contain:

  • #prodid#
  • #product_options_html#
  • other #variable_name# type variables that refer to individual products/totals

If you are including Special Offers on your site then you will need to include the following tag:

  • <!--offer_row-->...<!--/offer_row-->

If a table row was used above, ensure you use the same setup below - look at the demo template sets for examples.

This tag contains information about how to display the offer details of each product in the cart that is on special offer.

This tag must contain:

  • #hookline#
  • #inc_tax_offerprice# or #inc_tax_offerprice#
  • #offer_quantity#
  • #inc_tax_offerprice_total# or #inc_tax_offerprice_total#

This tag may also contain other fields that relate to an individual special offer item.

If you want to display the total with postage added (only used in tpl_viewcart.htm if shopper has already selected their postage type) then you must use this tag:

  • <!--postage-->...<!--postage-->

This tag may contain:

  • #ex_tax_postage#
  • #inc_tax_postage#
  • #postage_tax#
  • #postage_band# (usually in brackets after the 'postage' marker)
  • #ex_tax_grand_total#
  • #inc_tax_grand_total#
  • #grand_total_tax#

You'll probably want to use some of these in the tpl_viewcart.htm template as well:

  • #ex_tax_postage#
  • #inc_tax_postage#
  • #postage_tax#
  • #ex_tax_grand_total#
  • #inc_tax_grand_total#
  • #grand_total_tax#

It's pretty important to include #ex_tax_grand_total# and #inc_tax_grand_total# - otherwise the shopper won't know how much you are charging them.


How do I add Custom Text Fields to my Products?

You can also add text fields for products - eg, engravings, gift message, t-shirt prints. If you add them to the tpl_shop.htm template, they appear on all products. If you only need them for some products, build your site, then edit the relevant shop pages manually. They are restricted to 100 characters in length.

To add a custom field, do one of the following:

include this line in the product description:
\customoption{Option_Name}
Please be sure to use underscores (_) instead of spaces, otherwise you'll run into problems.

include a text field in the following format within the <--product-prodid-->...<--/product-prodid--> tag.
<INPUT TYPE="text" NAME="customoption_Option_Name">

The Option_Name part is displayed as an option of name Option Name for the product (ie, all underscores get changed to spaces for display).

If you add _required (or \customoption{Option_Name_required}) to the end of your option name then GT will make sure that a customer has entered a value into that option field.

This text can also be used to change the price of the product. This is rather geeky, and should only be done by web designer's who are happy to play with Perl's regular expressions.


How do I make Text Input Boxes change the price of a product?

  1. Create a file called customoption_Option_Name.csv and place it in the trolleyed_admin (when Option_Name is the same name as used in the text input field)
  2. populate it with data as detailed below

format of customoption_...csv files

You will need to understand what a Perl regular expression is to do this.

Start the file with the following line:

rank,regexp,price_adjust

Where rank is order to apply regular expressions, regexp is the expression to search for, and price_adjust is the difference that this pattern makes to the product's price. Then, on the following lines, place the regular expressions to match (For letters, the match will be case insensitive).

The patterns are matched against the text input in the order they are stored, with the amount stated in the last column added (or removed) to the total each time a match is made. When a pattern no longer matches, the next lowest ranked pattern is tried.

For Example: Say you engraved your products, and had special rates for certain phrases, and extra characters were charged at a standard rate. Eg:

  • short form year, eg JAN 2000, costs 5.00
  • extra characters cost 1

With these rules, the customoption_Engraving.csv file would be:

rank,regexp,price_adjust
1,(?:JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)\s+\d{4},+5.00
2,\S,+1.00 

Looks worse than it actually is. Here's a breakdown of the regular expression:

(?:JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)

one of these months

\s+

one or more spaces

\d{4}

four digits

The expression in the last row of data, \S, matches any non-whitespace character.

So, if you entered "The champion - JAN 2001", your product total would increase by 17 - 5 for short date + 12 for the other 12 characters.


Can I add custom checkboxes to my products?

This is done in a similar way to adding a custom text field.

To add a custom field, include a checkbox field in the following format within the <--product-prodid-->...<--/product-prodid--> tag.
<INPUT TYPE="checkbox" NAME="checkboxoption_Option_Name">

The Option_Name part is displayed as an option of name Option Name for the product (ie, all underscores get changed to spaces for display).

If you add a value to your tick box containing a number then GT will change the price accordingly
<INPUT TYPE="checkbox" NAME="checkboxoption_Option_Name" VALUE="price">

For example the following code when ticked would add an option called "Include Gloves" and add 5 to the price:
<INPUT TYPE="checkbox" NAME="checkboxoption_Include_Gloves" VALUE="5">


Can I add select boxes to my products where you can select more than one option?

You can do this by adding the following code within the <--product-prodid-->...<--/product-prodid--> tag.
<SELECT NAME="selectmultioption_Option_Name" MULTIPLE>
<OPTION VALUE="Option_1(+5)">Option_1(+5)
<OPTION VALUE="Option_2(-5)">Option_2(-5)
<OPTION VALUE="Option_3">Option_3
<OPTION VALUE="Option_4(+10)">Option_4(+10)
...
</SELECT>

Where Option_Name is the name of the option (with underscores instead of spaces). Replace Option_? with the option value. Replace the number in brackets with the price affect. You can keep adding these option lines until you have the required number of options.


Previous / Contents / Next

shopping cart home | ecommerce products | online payment features | uk shop hosting
uk web design | software resellers | secure reviews | support | terms | contact

 
       
uk ecommerce solution