Working with Templates
Overview
As Aurora Commerce do not deal with 'Design' work, this document hopes to describe clearly the following two things:
- What Agencies working with Aurora Commerce can expect to receive during ongoing developments.
- How Agencies should go about managing the Aurora Templates and implementing its various features.
PLEASE NOTE: This document does not cover the difference between 'Design' and 'Development' work or how Aurora Commerce distinguishes between the two. For more information regarding this please refer to the Aurora Commerce Design vs Development Guidelines.
PLEASE NOTE: For any accompanying documentation noted in this document that you do not have access to, please approach your assigned Aurora Commerce Account Manager to obtain the required access.
Glossary of Terms
Before we begin, please see the following list of terms used in this document (and throughout the Aurora documentation) to describe different aspects of Aurora and it's systems:
- Aurora Core: This refers to anything that is common to ALL instances of Aurora and belongs to Aurora Commerce. This includes anything in the Back-end and most scripts driving the Front-end (not the Front-end templates).
- Aurora Demo: This refers to the globally accessible demonstration website that Aurora Commerce provide and can be found here: https://demo.auroracommerce.com/
- Back-end: This refers to the administration area of Aurora, which is any Page, Code or System found in or controlled by the "/aurora/" section of your site.
- Front-end: This refers to the customer facing area of your website, i.e. the website in general, which your customers can see.
- Templates: These are files (usually HTML, but can also include some images, JavaScript and CSS) that control how your site looks and is structured. Back-end Templates refer to the 'look' of the pages in the '/aurora/' section and belong editing wise to Aurora Commerce while Front-end templates refer to the 'look' of the main customer facing website and editing wise belong to you and your Agency.
Agencies will receive...
Documentation
All Agencies will receive the Aurora 3 Front-end documentation describing how to implement any feature of Aurora that they require. If said documentation is not available for a particular feature (i.e. it does not exists), then it should be requested by the Agency and will be produced by Aurora Commerce.
PLEASE NOTE: This documentation writing process can be very time consuming and may in some cases require billable development time and so will need to be passed through all the usual Aurora Commerce workflow management channels. Because of this, some documentation may not be able to be produced on demand and will need to be booked for creation as part of Aurora Commerce's on-going work schedule.
What will the documentation include?
All Aurora documentation will endeavour to include the following:
- Instruction regarding the features proper use from both the customer and the administrator's point of view.
- Where an example can be found, if appropriate, on Aurora Demo and it's templates.
- What requires styling and what styles are already in place and/or important. It may be that some features require specific CSS classes or styles to function properly. If this is so then this will be detailed in the documentation.
- Any JavaScript required to make something perform properly.
- What pages a feature can be applied to or used on. For example some features may be restricted to the Product Listing pages, while others are available site-wide.
- What the limitations of the feature are. An effort will be made to accurately describe exactly what the feature can or cannot do to allow Agencies to identify easily if it is going to support what they are trying to do.
Examples in Aurora Demo
Where possible all core supported features within Aurora will be made available by way of examples on the Aurora Demo site. This may not always be possible (where a feature is confined to a single Client site, for example as a piece of some 'custom' work), but where it is not, every effort will be made to provide examples to provide minimum base support for those features for the Agency to then customise.
Aurora Demo Templates
All Agencies and 3rd Parties will be granted complete and up-to-date copies of the Aurora Demo example templates. These can be used in whole or in part during their implementation of the features on the Client site own Front-end Templates.
Release Notes
When a feature is released to an Agency or other Third Party, the following information will be provided:
- A link to the user documentation, describing the feature, how it works and how it can be implemented within the Aurora Templates.
- Where possible a link to a working example on Aurora Demo. If no working example exists, then custom examples will be provided wherever possible (this may already be part of the documentation).
- A link to a compressed file (ZIP) containing the latest Aurora Demo "example.com" templates for reference.
Agencies are expected to...
Manage the Templates and all other Design work
All 'Design' work will be done by the Agencies and applied to the Templates as they see fit and so it is their responsibility to maintain their own back-ups and repositories to store and manage their work. Aurora Commerce may maintain a copy of a Client's site Templates for the purposes of testing and local development, but this is not intended for the use of Agencies and so should not be relied upon for roll-back procedures should an issue in Design occur.
Agencies are also expected to make reasonable efforts to make best use of Aurora's coding methods and guidelines within the Client's site Templates. This is to help ensure the Templates remain easily maintainable in the event that:
- Aurora Commerce ever be needed to assist with an issue
- It is required that the Templates Management to change hands (between Agencies)
- New features designed by Aurora Commerce are launched into the Client's existing site
Releasing work
Aurora Commerce will release Aurora updates at the request of the Agency from time to time. As part of these updates there will be downtime as we release the latest stable version of Aurora to the clients site. The only updates we will ever deploy will be within Aurora itself - we will never update the templates to the live site, as this is the job of the Agency. In such an event that a list of work is due to go live, Aurora Commerce will push the latest stable version of Aurora to live after agreeing on a time with the Agency. It is then the Agencies job to push their own work to live and check their work.
How to work with Aurora Front-end Templates
This topic is far too complex to cover here in one single guide and so rather than describing how to use any one specific feature of Aurora, this section merely aims to set out how and where to go to find out what you need to know. This includes a top level overview of the kind of systems you will need to use and provides some guidance on where to find answers to some of the most common or important aspects of working with the Aurora Templates.
Aurora uses Smarty 3
Aurora uses Smarty for all of its templates, however the use of Smarty is not something that is covered in the scope of these documents. If you require help using Smarty, please see the external Smarty 3 Documentation.
What we do cover in these documents is the specific configurations and custom methods provided by Aurora for use in its Smarty templates.
Important Methods
Some things can be done lots of ways, but Aurora works best to provide its multi-currency and multi-language support using a specific set of methods and techniques. It is highly recommended that these methods and techniques be adhered to for all template developments to help ensure that all features are properly supported throughout a Client's site Front-end.
Please access to the following guides to help you work within the recommended practices for Aurora to ensure that the most is made of the features Aurora provides:
Multi-Domain Templates (Themes/Theming)
Displaying Prices in Templates
Affiliate and Traffic Tracking Codes
How to include CSS and JavaScript in Templates
If you are taking over an existing site dated pre 2015, JavaScript and a few select CSS files come in two varieties: Core and Custom. A Core file is one that is provided and maintained by Aurora Commerce and Custom are files that are found in the Template directory and are managed by the Agencies. For all new builds from 2015 onwards, Aurora Commerce will not link through to the Core code, as this is not code that the agency can access; instead, as noted above, Aurora Commerce will provide documentation instead. All Core JavaScript should be used by the agency at their own discretion.
CSS is always considered the responsibility of the Agencies to manage, regardless of its source (Core or Custom) and changes can be applied to override any undesired CSS applied by a Core file.
For help learning how to include JavaScript and CSS files in Aurora Templates, please see the Including, Minifying and compressing JavaScript and CSS guide.
Template, CSS and JavaScript Caching
There are various locations from which Caching of Aurora's Templates, CSS and JavaScript includes are controlled. When applying changes to Templates in Aurora, any cached Templates should automatically be cleared and re-loaded by Aurora. If this does not seem to be occurring, you can use the "Clear the Template Cache" feature in the Aurora Back-end > Content > Site Text section to force Aurora to clear the Template cache.
If you need changes in your JavaScript or CSS to be refreshed for all consumers, then you can use the Aurora Back-end > Store > View Cache section and update the "Resource Version" value to something that has not previously been used. This will ensure that all resource URLs provided by Aurora's own in-built 'include' methods will be updated to feature this new number, forcing even any CDN caches to be refreshed.
Still can't implement it correctly?
If the Agency is unable to implement a new feature in the Front-end Templates or cannot solve some other Front-end issue, Aurora Commerce can provide support, but this may come at a cost if the work required is not a direct result of a bug in the Aurora Code-base. If such an issue arises, then the Agency should contact their assigned Aurora Commerce Account Manager for assessment and booking.
Aurora Commerce may decline any work that they deem not to be 'Development' in any way, but will always endeavour to provide assistance and a support wherever they can. This is because there are no in-house Designers on the Aurora Commerce team and so some jobs will simply fall outside of Aurora Commerce's skill-set.
Updated over 2 years ago