In this tutorial we will give you an overview of how the invoicing works, how you can adjust invoice and credit note templates and what else is important to know.
- BreezingCommerce creates PDF invoices, no matter if you configure BreezingCommerce to attach PDFs to customer emails
- The invoices are stored in the folder "/media/breezingcommerce/invoice/invoices/"
- The invoices folder contains an index.html and is protected with an .htaccess file from public access
- If you are NOT using Apache, then please protect that folder from public access according to your webserver settings (e.g. IIS)
- By default, the PDF files are named with a random string in the end and can be adjusted in BreezingCommerce => Configuration => Invoices
- The PDFs do NOT support unicode by default, as such a font file would be too large to ship with the main component. If you need unicode support (for example Chinese, Russian, etc), then please download a compatible unicode font from here.
- Unzip the font file zip and copy both files inside into the folder "/media/breezingcommerce/invoice/font/" and it will be picked up automatically for further invoicing. If the folder 'font' is missing, simply create it before adding the files.
The invoices ship with a generic company logo. You might want to add your own logo: The name of your logo must be "logo.png" and copied into the folder "/media/breezingcommerce/invoice/templates/".
Be aware that your logo will be used with the exact dimensions given and is not scaled down within the PDF.
According to business regulations in most countries, there is a clear distinction between Receipts and Invoices. Receipts shall give you a quick overview of what has been bought. They are used e.g. to proof a payment when a warranty applies but aren't necessarily accepted by the finance office for tax declaration (most strict laws on this apply in the EU, especially Germany).
If you are located in a country that doesn't distinct between receipts and invoices, then it will be fine to setup BreezingCommerce => Configuration => Invoice in a way to not attach the invoice PDF to the receipt email. If you are located in such a country, then better attach the invoice PDF to the receipt email.
Additionally, you can decide if you want the receipt email to be sent as text or html. The html version will just look like the invoice PDF, while the text version will be a simple text representation of the order.
Text receipts are always used for admin order notification emails.
As described in the Orders tutorial there also might be credit notes if an order will be cancelled or refunded. Order notes are only triggered on admin action, but are also stored into the same location like regular invoices.
For every receipt (text/html), invoice and credit note you can create a custom template. By default, BreezingCommerce picks the templates from its internal structure but can override these template in BreezingCommerce => Configuration => Invoice.
There are 6 different templates you can adjust:
- Template PDF => the main PDF template
- Template HTML => the html template for the receipt if HTML is enabled
- Template Text = > the text template for the receipt if Text is enabled
- Return Template PDF => the main PDF template for cancelled orders
- Return Template HTML => the html template for the cancellation receipt if HTML is enabled
- Return Template Text => the text template for the cancellation receipt if Text is enabled
If you want to create a custom template for any of these, then please check "Reset..." to "yes" and save the configuration. It will then load the default template into the editor from where you can start to define your custom template.
After saving a, the templates will be saved in the folder "/media/breezingcommerce/invoice/templates/". Each time you're editing a template, the files located in that folder will be used instead of the standard ones.
If you want to start over, then simply clear the editor and save. Then reset again. This will recover the standard templates.
The PDF template's HTML should be simple, containing CSS 2.0 styles. Best is to use inline styles with "mm" dimensions instead of "px" as this will return exact sizes within the PDF.
The HTML templates will be sent by email. Also take care that you are using markup that will be accepted by regular email providers and by email clients.