PTS Alegra

Complete documentation to install, configure, and use the PTS Alegra module in your PrestaShop store.

What is PTS Alegra?

PTS Alegra connects your PrestaShop store with Alegra so you can issue electronic invoices and credit notes straight from the order, keeping customers, products, carriers, bank accounts, numberings and withholdings in sync.

5.3.2
Version
PS 1.7.6+
PS 8.x
PS 9.x
Multistore
Multi-language

Main Features

Billing from the order

The Alegra invoice is issued from the PrestaShop order page itself, and credit notes are created from there too.

Data matching

Products, carriers, customers, bank accounts and withholdings are matched with their Alegra counterparts so the invoice goes out with the right information.

Numberings per country

Each country can have its own Alegra numbering assigned, on top of the module's default numbering.

Ticket POS

Produces a point-of-sale ticket with the establishment details you configure in the module itself.

System Requirements

Requirement Minimum Recommended
PrestaShop 1.7.6 9.x
PHP 7.2.5 8.1+
PHP extensions curl, mbstring, openssl The same
Alegra account Active, with user and API token A sandbox account as well, for testing

Installation

There are two methods to install the module in your PrestaShop store, depending on your server characteristics.

Method 1: Installation from Back Office

1
Access the Back Office

Log in to your PrestaShop store administration panel.

2
Navigate to Modules

Go to Modules → Module Manager in the side menu.

3
Upload the module

Click "Upload a module" and select the downloaded ZIP file.

4
Install and activate

Once uploaded, the module will install automatically. Click "Configure" to get started.

Method 2: FTP Installation

1
Extract the ZIP file

Extract the contents of the ZIP file on your local computer.

2
Connect via FTP

Use an FTP client (like FileZilla) to connect to your server.

3
Upload the module folder

Upload the module folder to /modules/ in your PrestaShop installation.

4
Install from Back Office

Go to Modules → Module Manager, search for the module and click "Install".

Possible Installation Issues

If you experience override errors when installing or activating the module, don't try to resolve it yourself if you don't have technical experience. Contact our support team to receive personalized help and resolve the conflict safely.

Contact Support

Accounts

This is the module's first tab and the only one that shows while there is no connection to Alegra. It is where you register the Alegra accounts the store is going to work with. The module supports several, and one of them is later marked as the default account.

The tab lists the accounts already connected and offers a Synchronize accounts button, which updates the status (active or inactive) of the accounts that already exist in Alegra.

Connection details

These are the four fields of the form that opens when you add an account. The last three are mandatory: without them the save button stays disabled.

Sandbox account

Marks the account as a test account. Use it to check how the module behaves without issuing documents in your real Alegra account.

User

The user of the Alegra account the store connects with.

User token

The API token Alegra generates for that user. It is what authorises the module to operate on the account.

Account country

The country the Alegra account belongs to. It conditions the fiscal behaviour of the documents issued with it.

General

Brings together the settings that govern how the module invoices. You reach them from Modules → PTS Alegra → Configure, in the General tab.

Debugging

Debug mode

Enables the module's debug log so you can diagnose its behaviour. Turning it on reveals the IP field.

IP

Restricts debugging to one IP address, so only that one sees the behaviour under test. The module includes a button that fills the field with the IP you are connected from.

Integrations

Integration with Sales Commissions

Connects the module with PTS Sales Commissions. For the integration to work, that module has to be installed and active in the store: if it is not, switching this on here adds nothing to the billing screen.

Account and default values

Alegra account by default

Chooses which of the connected accounts the module uses to invoice. It is the option that unlocks the rest of the tab and the association tabs.

Default ISO currency

Declares which is the base currency of your Alegra account. The options are Colombian Peso (COP) and Euro (EUR). It does not limit which currencies the store can sell in: it is the reference the module uses to decide whether an order is in its own currency or in a foreign one.

Default language for sending information

Determines which language the data the module sends to Alegra travels in.

Default numeration for invoices

The Alegra numbering applied to invoices when the order's country has no numbering of its own assigned in the Numerations tab.

Default ledger account for products

The Alegra ledger account assigned to the products the module creates or invoices when they do not have one of their own.

Delivery terms

The incoterm that accompanies the invoice. The list includes, among others, Cost and freight (CFR), Cost, freight and insurance (CIF), In factory (EXW) and Franco on board (FOB).

Customer groups that cannot invoice

Select one or more PrestaShop customer groups whose orders cannot be invoiced with the module. It accepts several groups at once.

Cost center

The Alegra cost center the invoices issued by the module are charged to.

Behaviour when billing

Show Ticket POS after billing

Once the invoice has been issued, it opens the point-of-sale ticket automatically.

Show the invoice created on another page

After creating the invoice, it opens it on a separate page instead of staying on the order page.

Issue invoice with automatic payment

The invoice is issued with the payment taken as recorded, without having to mark it in a later step.

Hide issue invoice button

Removes the issue invoice button from the order page. It is useful in stores where billing is not done by whoever manages the orders.

Customers and records

Save clients with second name and second surname

When creating the customer in Alegra, it spreads the PrestaShop first name and surnames across Alegra's four fields instead of two. It only applies to customers who are a natural person; companies are saved under their business name.

Ignoring repeated customers

What is ignored is the duplicate check, not the customers: when enabled, Alegra accepts creating a new record even if another one already exists with the same identification number, instead of rejecting the request. Leave it off if you prefer a repeated identification to stop billing so you can review it.

Keep records of requests to Alegra

Lets you keep records of the requests made to Alegra that return an error. They are the ones that help diagnose an invoice that never got issued.

Associate

Groups the five screens that match PrestaShop data with Alegra data. They all follow the same pattern: a table with the existing associations and a form to add a new one. They only appear once an Alegra account by default has been chosen.

Products

Matches a store product with its equivalent product in Alegra, so the invoice line goes out with the right item.

Alegra product

The product from the Alegra account it is matched with.

Product

The PrestaShop store product to be matched.

Carriers

Matches each store carrier with an Alegra product, which is how Alegra represents the shipping charge inside the invoice.

Alegra product

The Alegra product that represents that carrier's shipping.

Carrier

The PrestaShop carrier to be matched.

Customers

Matches a store customer with their record in Alegra, so they are not duplicated when billing.

Alegra customer

The customer that already exists in Alegra.

Customer

The PrestaShop store customer.

Bank accounts

Relates a store payment method with the Alegra bank account the payment is recorded in.

Alegra bank account

The Alegra bank account where the payment is booked.

Currency

The bank account's currency.

Payment method

The PrestaShop payment method associated with that account.

Payment names

Lets you cover the variants under which the same method appears named in the orders.

Retentions

Defines which Alegra withholding applies according to the order's country and payment method.

Country

The country the withholding applies to.

Payment method

The payment method the withholding applies to.

Retention

The Alegra withholding applied when both conditions above are met.

Invoices

Groups the list of issued invoices and the settings around it: who is allowed to invoice, what data the ticket carries, and how to bring back changes made in Alegra.

List of invoices

Shows the invoices the module has issued. Each row carries a colour according to its status, and the screen itself includes the legend:

  • Invoice colour in Draft status.
  • Invoice colour in Opened status.
  • Invoice colour in Closed status.
  • Colour of the orders that cannot be invoiced.

The actions of each row do the same as the order block, including Link existing Alegra invoice and Unlink invoice. The order block is a shortcut: there is no need to open each order.

Restrictions

Assigns a specific Alegra account to a customer or to a group of customers. It is useful when the store works with several accounts and each one serves a different audience.

Alegra account

The Alegra account the restriction applies to.

Groups

The PrestaShop customer groups affected.

Customer

A specific customer, when the restriction is not by group but individual.

Ticket configuration

The establishment details printed on the Ticket POS. Unlike the other tabs, here changes are saved on their own as you leave each field.

Store name

The establishment name as it should appear on the ticket.

Address of the establishment

The address printed on the ticket.

Phone

The establishment's contact phone number.

Email

The establishment's contact email.

Website domain

The store's web address.

Free text

A text of your own added to the ticket.

Synchronize invoices

Brings the current status of the Alegra invoices back into PrestaShop, for when changes have been made directly there.

1
Choose the date range

On the calendar, mark the start and end dates of the invoices you want to update.

2
Press "Synchronize invoices"

The button stays disabled until you have selected a range.

Numerations

Assigns to each country the Alegra numbering its invoices must use. Anything without a numbering of its own here uses the Default numeration for invoices from the General tab.

Assigning a numbering to a country

Country list

The country the numbering is assigned to.

Numerations

The Alegra numbering that will be applied to that country.

Billing an order

Billing does not live in the module configuration, but on the PrestaShop order page, in a block called Alegra Invoicing that the module adds. Everything that follows happens there.

Before you start: what the module will ask you for

An Alegra invoice needs everything that goes in it to exist in Alegra too. If something is missing, the module does not fail silently: it opens a screen listing what it is missing and lets you resolve it without leaving the order, with an Associate button (link it with something that already exists in Alegra) or Create in Alegra (register it there and then).

The messages you may run into, and what each one means:

What it says What to do
The following products are not associated in Alegra… Associate or create them. Prevented beforehand from Associate → Products.
The following carrier is not associated in Alegra… Same, from Associate → Carriers.
The following customer is not associated in Alegra… Create or associate them. If it is a natural person, the identification number is mandatory and billing stops without it.
The following payment method is not associated in Alegra… Associate it from Associate → Bank accounts.
The following taxes were not created in Alegra… Create them in Alegra. These are not registered from the module.
No default numbering has been associated for invoices. Choose it in General → Default numeration for invoices.
The order currency is not created in Alegra… Create it in Alegra.
You do not have the multi-currency option activated in Alegra… It is a setting of your Alegra account, not of the module.

Depending on the order and the account's country, the module may also ask you for two more things before going on: the missing Customer data (document type and number, country of origin of the document) and the Information required for the invoice, which is where the conversion rate and the billing date are filled in when they are needed.

The life of an invoice, step by step

An Alegra invoice goes through three statuses, and in each one the module only shows what makes sense to do:

Status What it is Available buttons
Not invoiced The order has nothing in Alegra yet. Bill · Modify client and invoice · Link existing Alegra invoice
Draft It exists in Alegra but it is not a final document: it can be reviewed and redone. Bill · Modify client and invoice · Draft preview · Convert draft to invoice · Convert draft to invoice and issue it
Opened Final invoice, awaiting payment. Download invoice · Ticket POS · Pay Invoice · Delete payment · Create credit note · Unlink invoice
Closed Final invoice, already paid. Download invoice · Ticket POS · Create credit note · Unlink invoice
1
Bill

Creates the draft in Alegra with the order data. This is where the warnings from the previous section appear if something is still unassociated. It does not issue anything yet.

2
Draft preview

Opens the draft so you can check it before converting it. It is the last cheap moment to catch a mistake.

3
Convert draft to invoice

Turns the draft into a final invoice inside Alegra, without sending it to the tax authority.

4
Convert draft to invoice and issue it

The same as the previous one and, in addition, issues it, which is the electronic invoicing step. This is the option normally used.

5
Pay Invoice

Records the payment in Alegra and moves the invoice from Opened to Closed. The payment is booked in the bank account you have associated with that payment method.

The other actions in the block

Modify client and invoice

Opens the customer data so you can correct it before creating the draft. This is what you use when the customer entered their document wrongly or a fiscal detail is missing: changing it here saves you from having to void the invoice later.

Download invoice

Downloads the PDF of the invoice once it is final. It is the file the scheduled task deletes after 30 days; the invoice itself stays in Alegra.

Ticket POS

Opens the point-of-sale ticket with the data you set in Invoices → Ticket configuration. If you have Show Ticket POS after billing enabled, it opens on its own once billing is done.

Delete payment

Deletes the payments booked against that invoice in Alegra. It appears next to Pay Invoice while the invoice is still Opened, which is when a wrongly recorded payment can still be put right. If no payment is booked, there is nothing to delete.

Create credit note

This is the way to correct or void an invoice that has already been issued, and it only appears once the invoice is final (opened or closed). It opens a form with the number, contact, reason, notes, operation type and description, concept, rectifying invoice type, issue date, currency, price list, cost center and delivery order.

When the credit note is created, the voided invoice is no longer linked to the order, which is free to have the replacing invoice linked to it.

Link existing Alegra invoice

Links to the order an invoice that already exists in Alegra, for example one created manually there. It appears when the order has no invoice and opens the list of the latest invoices of that customer in Alegra, with their number, date, total and status. If the total does not match the order's it is highlighted in red, but it can still be linked.

Only open or closed invoices can be linked, from the same Alegra contact as the order's customer and not already linked to another order.

Unlink invoice

Removes the link between the order and its invoice, after asking for confirmation. It appears when the invoice is final (open or closed).

On the customer page and the product page

The module also adds a block of its own on the back-office customer page and product page, so you can see and manage their counterpart in Alegra from there without going to the Associate screens.

Scheduled task

The module exposes a scheduled-task URL that deletes old invoice PDF files so they do not pile up on the server. The screen shows the URL with buttons to copy or open it.

Translations

Edit Translations

The module includes a translation editor that allows you to customize all texts in any language installed in your store.

  1. Access the "Translations" section in the module configuration
  2. Select the language you want to edit
  3. Modify the text strings as needed
  4. Click "Save" to apply the changes

Available Actions

The translation editor includes several actions to manage your translations:

  • Save: Saves the changes made to the translations.
  • Save and download: Saves the changes and downloads the translation file for backup.
  • Share with us: Sends your translations to our PresTeamShop team to include them in future module versions.
  • Expand all: Shows all translation sections expanded.
  • Collapse all: Hides the content of all sections.

Backups

The backup system allows you to protect your module configuration and restore it if needed.

Generate Backup

To create a new backup, click the "Generate new backup" button. The system will create a backup of the current module configuration.

Upload Backup

If you have a previously downloaded backup, you can upload it by clicking the "Upload backup" button. A dialog will open where you can select the backup ZIP file.

Available Backups

The list shows all created backups. You can filter by date using the date selector and refresh the list with the "Refresh list" button.

List Actions

Each backup in the list has the following available actions:

Restore backup

Restores the module configuration

Download backup

Downloads the ZIP file

Delete backup

Deletes the backup

To restore, click the "Restore backup" button of the backup you want to recover and confirm the action in the dialog.

Troubleshooting

Common Issues

Verify that the module is correctly installed and activated. If the module has the debug mode option and it is active, make sure your IP is in the allowed IPs list. Also clear the PrestaShop cache from Advanced Parameters → Performance.

Verify that your PHP version is compatible (7.2 or higher). Check PHP and PrestaShop error logs. If the problem persists, contact technical support providing the error messages.

If you receive an override error during installation, it means another module is already using the same files. Don't try to resolve it manually. Contact our support team to receive personalized help.

It is necessary to configure the connection with Alegra to start using the module. Add an account in the Accounts tab with its user, user token and country; until there is a connected account, the remaining tabs do not appear.

You must choose a default Alegra account to be able to use the module. Until you select it in General → Alegra account by default, the options that depend on the account stay disabled and the Associate screens are not shown.

If you have made changes in Alegra, it is worth clearing the cache so the results are displayed correctly. The module itself offers a button to do it from its own screen. If what does not add up is the status of invoices already issued, use Invoices → Synchronize invoices with the matching date range.

Check two things: that the customer's default group is not included in General → Customer groups that cannot invoice, which is the option that does prevent billing; and that the button is not simply hidden by Hide issue invoice button. If what happens is that the invoice goes out under the wrong Alegra account, that is not a block: look at the rules in Invoices → Restrictions, which are the ones that decide the account.

Frequently Asked Questions

Licenses and Purchase

The license includes updates and technical support for a specific period (6, 12, or 24 months depending on the plan chosen). Once it expires, you can optionally renew to continue receiving updates and support.
The license includes installation on one production domain, access to all updates, and technical support during the active license period.
You can see the live demo available on our website to explore all the module features. We do not offer trial versions for installation on your site.
The module will continue to work normally, but you will not receive new updates or have access to technical support.

Installation and Compatibility

The module is designed to work with any theme that follows PrestaShop standards. If you experience any conflict with your theme, contact our support team.
Yes, your license includes installation in two environments: production and development/staging. This allows you to test updates and changes before applying them to your live store.
Yes, the module is designed to be compatible with other modules. In case of conflict with a specific module, our support team can help you resolve it.
No, installation is very simple and is done from the PrestaShop Back Office. If you have any problems during installation, our support team is available to help you.

Updates

No, updates preserve all your configuration and data. You would only lose the configuration if you uninstall and reinstall the module, which is not necessary for updating.
You can check for new versions by visiting our website or accessing your account in our store. We will soon add the option to check for updates directly from the module panel.
It is not mandatory, but it is recommended to update to enjoy the latest improvements, new features, and security fixes.

Technical Support

We usually respond within 24-48 business hours.
Yes, as long as you have active support within your license period, you have full access to technical support.
You can request help with installation, configuration, error resolution, and general questions about how the module works.
Yes, our support team provides assistance in both Spanish and English.

Refunds and Warranty

We only apply refunds if the module fails to work in your store after receiving technical support. Keep in mind that before purchase you have a demo available to test the module.
We guarantee that the module works as described in the documentation. If you find any bug, we fix it at no additional cost.

Customization

Yes, we offer custom development services. Contact our support team to request a personalized quote.
It is not recommended to modify the module code yourself, as you would lose technical support and when updating the module you would lose the changes made. If you need additional features, we recommend requesting a custom development quote so that the changes are included in the module and maintained in future versions.

Support

If you need additional help or have any questions about the module, we're here to help.

Email Support

Send us an email and we'll respond as soon as possible.

support@presteamshop.com

Help Center

Visit our help center for more resources.

Visit Help Center