Template Customization
Templates are stored in their own folder under the /templates directory.
The Template Files
category.tpl - Displays list of products for selected category. Also used on homepage where homepage setting is configured to "node". Can be overridden with custom category template file.
cart-table.tpl - The inner-table template for the shopping cart used in cart.php
cart.tpl - The main page template used for cart.php
contact.tpl - Template file for the contact form used in contact.php
error.tpl - Template file for error messages.
footer.tpl - Global footer template file.
header.tpl - Global header template file.
login.tpl - Login form template file, display when accessing login.php, or when accessing a restricted area while not logged in.
offers.tpl - Template file for a list third-party offers from alternative sellers for a specified product.
privacy.tpl - Template file for the privacy policy.
product.tpl - Template file for full product details. Can be overridden with custom product template file.
register.tpl - Template file for the registration form.
reviews.tpl - Template file for product reviews.
search-blended.tpl - Search results template file, used when search category "All" is selected. Results are summarised in each of the sites configured categories.
search.tpl - Search results template file for all search queries where a configured category is selected.
sidebar-left.tpl - Template file for content on the left column.
sidebar-right.tpl - Template file for content on the right column.
transactions.tpl - Template file for transaction lookups.
add-bookmark.tpl,add-pricetrack.tpl,add-review.tpl - Template forms.
All template files beginning with "account" allow you to customise the members area pages.
Although Affiliate Niche Script comes with templates as default, we understand you may require to create your own templates to make your store more unique. You can easily create your own template simply by copying a template's folder in the /templates directory and uploading it with a new name.
For example, I want to create a new template based on the "default" template, I would copy the folder /templates/default to /templates/custom1.
The next step would be to edit the template files and change the store's active template in the admin panel under advanced settings.
Customising Category pages
To customise category pages you will need to modify category.tpl. This file displays a list of up to 10 products from the chosen category.
You can also customise the template for each seperate category by creating a new template file based on the category name.
To do this, create a folder called "categories" inside your template folder, i.e. /templates/custom1/categories/. Next, you need to get the "friendly name" of the category you wish to customise. To do this, login to the admin panel, click Store Configuration, click Categories and then click on the category of your choice. You will see a table field called "Friendly Name", simply note down the value for this field and name your custom category template file based on the value with "tpl" as the extension name. An example for a "Cell Phones" category with a friendly name of "cell-phones" would be /templates/custom-default/categories/cell-phones.tpl. When you browse this category Affiliate Niche Script will now use cell-phones.tpl instead of browse.tpl, if you rename/move/delete cell-phones.tpl it will go back to using browse.tpl.
Customising Product Pages
To customise product pages you will need to modify product.tpl. This file will display the full details for the specified product. As with categories, you can create a custom template file for each product, based on the Amazon ASIN number. This can be useful if you want to create landing pages. To create custom template file for products, create a new folder inside your template folder called "products". Then simply create a new file for each product with the "ASIN number" as the file name and "tpl" as the extension. An example for "The Hangover (Unrated Edition) [Blu-ray]" would be /templates/custom-default/products/B001UV4XEW.tpl.



