The system has a built-in PDF library to generate beautiful invoices for orders made on the marketplace. Customers can download the order invoices from their order detail page. Admin and vendors also have download options.
Basic Invoice Settings >= V-2.0.6 < 2.17.0
You can configure your preferences for invoices like the title, paper size, and color, etc.
The platform is all set to generate nicely formatted invoices without any configuration needed. To set your own preferences please open the config/invoice.php
file and change the default settings.
The default configuration:
/* |-------------------------------------------------------------------------- | Title |-------------------------------------------------------------------------- | | Keep it empty to use the default title 'Invoice' that comes from language file. | */ 'title' => '', /* |-------------------------------------------------------------------------- | Color |-------------------------------------------------------------------------- | | Set primary color in hex | */ 'color' => '#007fff', /* |-------------------------------------------------------------------------- | Document size |-------------------------------------------------------------------------- | | Supported document size values are A4, letter, legal | */ 'size' => 'A4',
By default, the system uses paper size A4
and and title Invoice
. You can also set the invoice color here, use hexadecimal color code.
Customise or Add Invoice Template >= V-2.17.0
Starting from 2.17 zCart will be using PHP file based templates(blade templates files) for generating invoices. This means you can laravel’s blade files to customize your own platforms invoices for customers. This allows using html, css ,php and blade directives for creating or modifying your own unique invoice template.
To find the current template go to the resources/views/pdf_templates
directory. Inside the directory there will be a file named default_order_invoice.blade.php
. This file is used as a template for generating the invoice. All data is passed inside the blade file in the $data
variable.
You can customize the invoice by making changes in the default_order_invoice.blade.php
file. For example by changing the data css in the <style> </style>
tag you can change the color of table, text or by commenting or removing the <img/>
tags you can remove the image of shops in the invoice.
default_order_invoice.blade.php
as a backup saved somewhere to ensure in case your modification gives error you can revert the changes.
Follow the below basic guidelines for any modifications:
- Always keep a copy of the default template before making changes.
- Fonts used need to have utf-8 support otherwise wont support multilingual translation.
- Templates don’t support flexbox or grid.
- Use inline style tag or style div for making changes to the css. Linking external css libraries through css can cause errors in some cases.
It’s best to Contact the Incevio team for specific large changes. As we know our code best.