Polish Company Lookup with GUS for Magento 2
- Compatibility
- 2.4.9, 2.4.8, 2.4.7, 2.4.6, 2.4.5, 2.4.4, 2.4.3, 2.4.2, 2.4.1, 2.4.0, 2.3.7, 2.3.6, 2.3.5, 2.3.4
Description / Polish Company Lookup with GUS for Magento 2
MAGENTO 2 · B2B · COMPANY DATA · CHECKOUT
Enter the NIP. Fill in company data from GUS.
Kowal Gus
Make it easier for business customers to place orders: retrieve the company name and address from the GUS registry instead of entering each element manually. Use the same feature when creating orders in the Magento admin panel.
Name and address · Checkout and Magento Admin · Test mode
HOW IT WORKS IN PRACTICE
01 · Configure access
You enable the module and set the GUS service user key.
02 · The user enters the NIP
Changing the field triggers company data retrieval.
03 · The form fills in the data
The name, street, postal code, and city are added to the address fields.
What does your store gain?
Explore the module features, use cases, and settings.
Introduction
The Kowal_Gus module is an innovative solution for Magento 2-based stores that automatically retrieves company data based on the NIP number. Thanks to integration with the Statistics Poland (GUS) API, users can instantly fill in address data without having to enter information manually.
Module features
- Automatic company data retrieval based on the NIP number
- Filling in form fields: company name, address, postal code, city
- Support for both the checkout page and the admin panel
- Option to enable or disable the module in the Magento configuration
- Seamless integration with native Magento forms
Benefits of implementing the module
- Time savings – eliminates manual data entry
- Greater accuracy – helps avoid typos and incorrect addresses
- Better customer service – a faster and more intuitive order placement process
- Accurate company data for further processing and invoices; retrieving data from the registry supports accuracy, but does not in itself confirm tax compliance.
How does the module work?
After the NIP number is entered in the order form, the module sends a request to the GUS API and automatically fills in the form fields with the appropriate data. The mechanism works both on the checkout page and when manually creating an order in the admin panel.
Installation and configuration
The module can be easily installed in Magento 2 by adding it to the app/code/Kowal/Gus directory and enabling it in the system configuration. In the admin panel, there is an option to activate the module and enter the API key for authorized access to GUS data.
Summary
The Kowal_Gus module is an ideal solution for Magento 2 store owners who want to streamline the process of entering business customer data. Thanks to automation, it significantly reduces order placement time, improves accuracy, and enhances the quality of customer service.
GUS access and form handling
In Stores → Configuration → Kowal → nipfromgus → Settings, you activate the module, set the test mode, and enter the GUS user key. The package uses the gusapi/gusapi library. It requires access to the GUS service and a visible NIP field.
The script removes characters other than digits from the NIP and sends a request after the field changes when the number has 10 digits. After receiving a response, it fills in the company name, street with building and apartment number, postal code, and city. The code includes layouts for checkout, Amasty Checkout, and order creation in the panel; compatibility with a specific checkout and theme should be verified during implementation.
Accurate data for further processing
Retrieving registry data reduces manual entry and may decrease the number of typos. The data should be checked before it is used for an order or invoice. The module does not perform a separate tax verification of the company.
Installation via Composer
Package kowal/module-gus, module Kowal_Gus. After configuring access to the Kowal repository, install the package, enable the module, update Magento, and clear the cache. In production, include compilation and static content deployment according to the store process.
From configuration to results
1. Configure access
You enable the module and set the GUS service user key.
2. The user enters the NIP
Changing the field triggers company data retrieval.
3. The form fills in the data
The name, street, postal code, and city are added to the address fields.
Less typing for business purchases
The customer enters the NIP in checkout. After a correct GUS response, the module fills in the company name and address. The customer checks the data before placing the order.
The administrator can also use data retrieval when manually creating an order.
Simplify orders for business customers
Want to adapt the module to your store? Ask about a Kowal Gus implementation and discuss the configuration or required extensions.
More Information
| Theme compatibility | Luma / Blank, KOWAL |
|---|
Questions and Answers
Does the module work both on the checkout page and in the admin panel?
Can I enable or disable the module in the Magento configuration?
Does the module require overwriting Magento core or theme files?
Do I need to obtain an API key for the module to use the GUS database?
Does the module improve the accuracy of company data in orders and invoices?
Does the module work with Magento 2-2.3.x and 2.4.x versions?
Does it affect the store’s performance?
Can the module be used in a B2B store where the customers are companies?
Do I receive installation documentation and technical support after purchase?
Module Installation Instructions
Installation and deployment
To install the module, simply:
- Install the module: - Add the Composer repository to the configuration by running
You will receive the access details for the Composer repository (customer email address and license token) by email after purchase. They are also available in the customer panel after logging in at kowal.store. Replace
TWOJ_EMAIL_KLIENTAwith your account email address andTWOJ_TOKENwith the token you received. Run the commands in the Magento root directory.composer config repositories.kowal composer https://repo.kowal.store
Add the access token to the private repositorycomposer config http-basic.repo.kowal.store 'TWOJ_EMAIL_KLIENTA' 'TWOJ_TOKEN'
Install the Composer module by runningcomposer require kowal/module-gus
Enable the module by runningphp bin/magento module:enable Kowal_Gus
- Run the commands:
bin/magento setup:upgrade bin/magento setup:di:compile bin/magento cache:flush bin/magento indexer:reindex sales_order_grid
- Go to Kowal.co → GUS → Settings and enable the module.
- Go to https://api.stat.gov.pl/Home/RegonApi and follow the instructions to obtain an API user key