GT Support Pages
Where do I find my templates?You can find your templates in two ways:
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--> <!--contents-->...<!--contents-->
<!--footer-->...<!--footer-->
tpl_addprod.htmThis 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: It can also contain the markers: tpl_cart.htmThis 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: It can also contain the tags: tpl_checkout.htmThis 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:
checking inputs
tpl_home.htmThis 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:
If you are including the <!--special_offers--> tag, it must contain a
tpl_news.htmUsed 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:
tpl_offers.htmThis template is used to generate the special offers page. The page must contain the tags:
The <!--special_offers-->...<!--special_offers--> pseudo tag must contain a
The page may also contain:
tpl_popup.htmIf 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 The page must also contain a <!--product-prodid-->...<!--/product-prodid--> pseudo tag. This tag must contain the following:
If any products contain options, it must include:
It may also contain:
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.htmThis template is used to generate the pages that form the bulk of your shop - the product pages. The page must contain the following tags:
This tag must contain tags for the following elements:
The tag can (and probably should) also contain the following:
The template can also contain:
tpl_viewcart.htmThis 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:
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:
The HTML you must use for each of the buttons/images is:
If you want to include product information in your checkout pages then you must include this tag:
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:
This tag may also contain:
If you are including Special Offers on your site then you will need to include the following tag:
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:
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:
This tag may contain:
You'll probably want to use some of these in the tpl_viewcart.htm template as well:
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: include a text field in the following format within the <--product-prodid-->...<--/product-prodid--> tag. 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?
format of customoption_...csv filesYou 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:
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:
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. 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 For example the following code when ticked would add an option called "Include Gloves" and add £5 to the price: 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. |