On this page

Lovat API Magento 2 documentation

Integrate your Magento store with your Lovat account. Lovat for Magento app allows you to calculate taxes in Lovat for all sales on your Magento site, and also upload EPR data for your packaging obligations.

There are two ways to install this plugin.

Option 1

  1. Follow the link https://github.com/LOVAT-compliance/vatcompliance-magento2-api
  2. Download the archive file.
  3. Upload files to the app/code folder.
  4. Enter the following commands into the command-line:
PUT
Comand line

php bin/magento setup:upgrade

php bin/magento setup:di:compile

php bin/magento cache:clean

Option 2 (Install a plugin via Composer):

  1. Install Composer if it’s necessary.
  2. Write this command composer require lovat/module-lovat
  3. Run the following commands into the command-line:
PUT
Comand line

php bin/magento setup:upgrade

php bin/magento setup:di:compile

php bin/magento cache:clean

You have installed and configured the plugin successfully in Magento2.
After successful installation of the plugin you need to complete the following steps:

  1. On the Admin panel, click System. In the Extensions section, select Integrations.
  2. In the upper-right corner, click the Add New Integration button and complete all information.

Lovat API Magento 2

*Please don’t fill these fields  Callback URL and Identity link URL

3. On the Admin panel choose API section.
4. Choose “Lovat Api” and mark the checkbox of this resource.

Lovat API Magento 2

5. When complete, click Save

After successful adding of the integration you need to activate it.  Do the following:

Lovat API Magento 2
6. Click the button Activate and this window will appear. Then click the Allow.
Lovat API Magento 2
When this window appears, click the button Done.
Lovat API Magento 2
*You can find these keys if you click the button Edit.
Lovat API Magento 2
All done! Provide your developer with these keys to access APIs.

How to enable tax calculation feature using Lovat plugin

  1. Open Settings section and click on the Lovat icon.
Lovat API Magento 2
2. Click the Add/Update data button to go to the Settings section.
Lovat API Magento 2
3. Fill in the required fields.
Lovat API Magento 2
Note, if you’d like to activate the tax calculation feature switch on the Yes in the Calculate tax field.
Lovat API Magento 2
To make sure that all your data is correct, click the button Test connection.
Lovat API Magento 2
Then you will see your test results.
Lovat API Magento 2
If everything is correct, click on the Save results button.
Lovat API Magento 2

4. If you’d like to edit your data in the table, click Add/Update data button again. And you’ll be redirected to the Settings section.

*When you edit the data, click the button Test connection and then save results.

Lovat API Magento 2

5. If you have transactions, your taxes will be calculated.

Lovat API Magento 2

Your product is added to the shopping cart. We don’t calculate tax on the checkout page because we wait when the client fills in data. When the client fills in his ZIP code and Country on the Checkout page, your tax will be calculated.

Lovat API Magento 2
6. Click the Next button on the Checkout page. The tax has been calculated and your client received the notification.
Lovat API Magento 2