Once you have successfully installed and activated the plugin, you can proceed with the configuration. This article provides a detailed description of the plugin's configuration options.
noteNote: Each sales channel must be configured individually. When configuring for "All Sales Channels", some plugin settings will be ignored. The API must be configured for "All Sales Channels".
Note: Each sales channel must be configured individually. When configuring for "All Sales Channels", some plugin settings will be ignored. The API must be configured for "All Sales Channels".
1. Settings
After you have installed and activated the plugin, it will already work completely automatically and generate invoices according to default settings for new orders from the time of installation as soon as they reach the payment status "Fully Paid". You can completely customize the plugin's behavior through the Shopware admin area.
Please first open the plugin settings under: Extensions -> My Extensions -> AutoInvoice - Automatic Document Generation.
Below you will find all plugin settings with brief explanations:
Option | Description |
|---|---|
Basic Settings | |
Action (from v5.8.0) | Select an action that the plugin should perform. |
Plugin active (v5.6.1 - v5.7.5) | If this option is not enabled, all plugin functions remain inactive. |
Send invoice to customer (until v5.7.5) | If this field is enabled, the customer will receive the invoice by email. For this option to work without errors, the option "Always create documents" must be disabled. |
Make invoice available in customer account | Enable this option if you also want to provide the customer invoice directly via the customer account. |
Process orders from | Orders received after this date will be automatically processed by the cron job. So that not all old customers automatically receive an invoice after installation, the date of first activation is set by default (from v5.6.2). |
Enable Cron Job (Scheduled Task) not inherited | By enabling this option, orders are processed by cron job in the background. The cron job runs asynchronously every 10 minutes, so invoice sending does not occur immediately after order completion. If you want to use this option, the option "Attach invoice to email" must remain empty. |
Attach invoice to email (optional) (from v5.5.6) not inherited | With this option you can choose which email's attachment the invoice should be sent with. The invoice will then be sent when other conditions are met. If the configured settings do not apply, the invoice will be sent with a separate email as soon as the settings apply. Important: This option is optional. However, if you want to use it, you must note the following: For this option to work without errors, the following fields must remain empty or have the value 'Open':
Additionally, the following options must be disabled:
If you use "Attach invoice to email", "Email to shop owner" will be ignored. |
Additional Settings | |
Shop owner email | The invoice copy and delivery note will be sent to this email address. Separate multiple email addresses with a comma. |
Email to shop owner | Select here which documents should be sent to the shop owner. If no delivery note was selected, it will not be created either. If you want to use "Email to shop owner", you must leave "Attach invoice to email" empty. |
Export directory (from v5.4.1) | Invoices, delivery notes, cancellations and credit notes will be exported to this directory. Please specify relative to the shop directory. Documents can be exported via Orders -> Invoices or via cron job. |
Allow automatic export of documents via cron job (from v5.4.1) | By enabling this field, invoices, delivery notes, cancellations and credit notes can be exported in the background via cron job. Important: To use this function, the cron job must be enabled in the basic settings. |
Export documents only from edited orders (from v5.7.4) | If enabled, documents will only be exported from orders marked as edited. |
Separate email field for invoices (from v5.7.2) | If enabled, the customer can enter a separate email address for invoice delivery during the checkout process. |
Customer chooses whether they need an invoice (from v5.6.0) | If this option is enabled, the customer can decide during the checkout process whether they want the invoice sent to them. |
Filename for invoice | Enter the filename for the PDF invoice here. The available variables can be found further down on this page. |
Filename for delivery note | Enter the filename for the PDF delivery note here. The available variables can be found further down on this page. |
Filename for cancellation invoice (from v5.5.10) | Enter the filename for the PDF cancellation invoice here. The available variables can be found further down on this page. |
Filename for credit note (from v5.5.10) | Enter the filename for the PDF credit note here. The available variables can be found further down on this page. |
Replace filenames in admin area (from v5.5.6) | Filenames are replaced when downloading in the admin area. |
Send existing invoice documents (until v5.7.5) | If this field is enabled, the plugin will also send the invoice if the invoice document already exists, for example created by another plugin. |
Send delivery note directly upon order receipt | When enabled, the delivery note will be sent directly to the shop owner upon order receipt. |
Always create documents (until v5.7.5) | With this option you can have documents created for internal use even if you disable the option "Send invoice to customer". |
Do not create documents via CLI (from v5.6.2) | If active, documents will neither be created nor sent when orders are created via CLI. Orders can still be processed via cron job. |
Order number for PDF preview (from v5.6.4) | Here you can specify an order number of an existing order. The preview will then always be created using the information from this order. Otherwise, an order will be selected randomly or automatically generated. Further information can be found under the menu item PDF Preview. |
Orders per cron job run | Enter here the number of orders that should be processed per cron job run. By default, a number of approximately 40 orders is recommended. The cron job runs by default every 10 minutes. This can be changed in the DB table 'scheduled_task' for the row with 'fgits_autoinvoice.auto_invoice_order_scan' in the 'run_interval' column. For this, enter a value in seconds. If you receive more than 200 orders per hour, you can increase the value. Important: The maximum number of orders per run depends on your server performance. |
No invoice for order value from (from v5.7.5) | Excludes orders with the order value from the specified value. If nothing is specified, this function is disabled. |
No invoice for order value up to (from v5.7.3) | Excludes orders with the order value up to the specified value. If nothing is specified, this function is disabled. |
No invoice for these billing countries (from v5.8.0) | Excludes the specified billing countries. No invoice will be generated for orders from these countries. All conditions must apply simultaneously. |
No invoice for these delivery countries | Excludes the specified delivery countries. No invoice will be generated for orders from these countries. All conditions must apply simultaneously. |
No invoice for these shipping methods (from v5.7.3) | Excludes the specified shipping methods. No invoice will be generated for orders with these shipping methods. All conditions must apply simultaneously. |
No invoice for these customer groups | Select here customer groups that should not receive an invoice. For example, if you want only business customers to receive an invoice, select all other customer groups here except "Reseller". |
No invoice for these payment methods | Select here the payment methods that you want to exclude from invoice generation. |
Exclude payment methods from synchronous processing | Orders with these payment methods will only be processed via cron job. Useful for PayPal invoice purchase etc. |
Payment methods for purchase on account | Invoices for orders with payment methods selected here will be sent immediately after order completion. |
Create invoice at payment status** | Select here a payment status at which the invoice (and delivery note) should be created and sent separately. As soon as the desired payment, delivery and order status are reached, an invoice (and delivery note) will be created and sent. If you want to use this option, the option "Attach invoice to email" must remain empty. When using the option "Attach invoice to email", this field must remain empty or be set to "Open". |
Create invoice at delivery status** (from v5.7.4) | Select here a delivery status at which the invoice (and delivery note) should be created and sent separately. As soon as the desired payment, delivery and order status are reached, an invoice (and delivery note) will be created and sent. If you want to use this option, the option "Attach invoice to email" must remain empty. When using the option "Attach invoice to email", this field must remain empty or be set to "Open". |
Create invoice at order status** | Select here an order status at which the invoice (and delivery note) should be created and sent separately. As soon as the desired payment, delivery and order status are reached, an invoice (and delivery note) will be created and sent. If you want to use this option, the option "Attach invoice to email" must remain empty. When using the option "Attach invoice to email", this field must remain empty or be set to "Open". |
Order status after invoice generation (from v5.6.2) | The plugin sets the order status to the selected status after successful invoice generation. |
Order status after invoice sending (from v5.6.2) | The plugin sets the order status to the selected status after successful invoice sending. |
Setup (from v5.6.2) | |
Remove email templates when plugin is disabled | If this field is enabled, the email templates you created will be deleted when the plugin is deactivated. |
API Settings (Until Version 5.8.4) | |
Admin user | In the fields "Admin username" and "Admin user password" enter the access credentials of a user who has access to the admin area. Note: This refers to a user you create under Settings -> System -> Users & Permissions. |
Authentication method (from v5.6.7) | Here you can select the authentication method:
|
Determine APP_URL automatically | This field is enabled by default so that APP_URL is automatically determined by the plugin. If the field is disabled, APP_URL is taken from the .env file or from the field below if specified. |
APP-URL | If APP_URL is specified here, this APP_URL will be used instead of the APP-URL from the .env file. |
** If the field is empty, the respective status change will not be considered. Until v5.7.3, empty field means any status. If the plugin is configured to create invoices, invoices will be created with every status change. If you only want to create invoices for certain status changes, explicitly select one or more statuses.
2. Customize filenames for invoice and delivery note
You can customize the filename of the invoice and delivery note via the respective options (see above). In addition to any text, you can also use the following variables, which are automatically filled in:
Variable | Description |
|---|---|
| Order number |
| Order date |
| Order time |
| Document number |
| Document prefix |
| Document name |
| Document date |
| Customer email |
| Number of documents |
| Customer first and last name |
| Customer first name |
| Customer last name |
3. Configuration after new installation (from v5.4.2)
If "Irrevocably delete all plugin data" was selected during plugin uninstallation, the plugin must be reconfigured upon reinstallation.
4. FAQ
How do I find orders that were processed by the plugin?
In the DB table "order" in the column "custom_fields", each order processed by our plugin is marked with "fgits_autoinvoice_processed": "1".
You can find all processed orders with the following SQL command:
`SELECT order_number FROM order` WHERE JSON_EXTRACT(custom_fields, '$.fgits_autoinvoice_processed') IS NOT NULL GROUP BY order_number;
You can find all orders processed with cron with the following SQL command:
`SELECT order_number FROM `order` WHERE JSON_EXTRACT(custom_fields, '$.fgits_autoinvoice_processed') IS NOT NULL AND JSON_EXTRACT(custom_fields, '$.fgits_autoinvoice_cron_date') IS NOT NULL GROUP BY order_number;
How can I customize PDF templates?
Our plugin does not provide its own PDF templates. You can customize these in your shop's admin area under Settings -> Documents.
How can I check if errors occur during export?
To do this, open the developer console in your browser and perform the export. If errors occur, they will be displayed there.