When working on an Invoice or Contract template, you may want to preview the result to ensure it functions as expected. This guide provides tips for setting up a test environment, previewing your template, and troubleshooting any issues.
Table of Contents
Setting Up for Template Testing
Creating and Editing Templates
Previewing Your Template
Editing and Previewing Changes
Troubleshooting Template Errors
1. Setting Up for Template Testing
To effectively test your templates, ensure you have the following:
Test Event: Create a test event, entering random details such as a deal, contact, and location. Name it clearly as a test event for easy identification and deletion afterward.
Browser Tabs: Use multiple tabs in Google Chrome for efficient editing and previewing.
Permissions: Confirm that you have permissions within ABOSS to access the Office section.
Warning: Changes to template code can cause malfunctions if the code isn’t written correctly. Always duplicate a template before making changes to the liquid code and proceed carefully.
2. Creating and Editing Templates
With your test event ready:
Go to the Office section in ABOSS and locate Invoice and Contract templates.
Create a new template or edit an existing one.
Save any changes by clicking the Save button at the top of the screen.
3. Previewing Your Template
Keep your editing tab open, and open a new browser tab.
In the new tab, navigate to ABOSS, open your test event, and create a new invoice or contract, depending on the template you’re testing.
Select your template in the Invoice or Contract.
Enter any optional details to complete the invoice or contract.
Note: To avoid using actual invoice or contract numbers from your range, type “Test” as the number.
Click Preview PDF to open a PDF preview of your template in a new tab.
4. Editing and Previewing Changes
With three browser tabs open (template editor, test event, and PDF preview), you can easily switch between them:
Make any further edits in the template editor tab and Save.
Switch to the PDF tab and refresh to view the updated template.
Repeat these steps until you are satisfied with the template.
5. Troubleshooting Template Errors
If there is an issue in the template code, you may encounter a syntax error. This typically occurs with incomplete “if” statements or incorrectly written variables. Here are some common examples:
Incorrect ‘if’ Statement
{% if event.fee > 0 %} {{ event.fee }}
Corrected Code
{% if event.fee > 0 %} {{ event.fee }}{% endif %}
Incomplete Variable
Copy code{{ contact.contact_name }
The closing bracket is missing here.
For additional examples of common mistakes, refer to this article. Contact support if you need further help. you are working on an Invoice or Contract template, you might want to preview the result during development of the form.