# Connect Joomla Commerce to ChatRex

The Joomla Commerce integration gives a ChatRex assistant read-only access to published products, variants, categories, prices, inventory, and storefront links from HikaShop or VirtueMart.

ChatRex does not read orders, customers, addresses, or payment data and cannot modify the Joomla catalog.

## Compatibility

- **System - ChatRex** plugin: Joomla 5.4 and 6.x with PHP 8.1 or later;
- HikaShop: Joomla 5.4 and 6.x;
- VirtueMart 4.8.2: Joomla 5.x only.

VirtueMart 4.8.2 does not install on Joomla 6.x. Use HikaShop when the site runs Joomla 6.

## Before you connect

Make sure you have:

- HikaShop or VirtueMart installed and configured;
- at least one visible, published product;
- a published storefront available over HTTPS;
- a Joomla user who can install and configure plugins;
- an active ChatRex account and bot.

## Connect the site

1. In ChatRex, open **Integrations → Joomla Commerce** and download the ZIP package.
2. In Joomla, open **System → Install → Extensions** and upload the ZIP.
3. Enable **System - ChatRex**.
4. Return to ChatRex and select **Generate code**.
5. In the plugin settings, choose HikaShop or VirtueMart, enter the storefront language and three-letter currency code, grant published-catalog consent, and paste the one-time code.
6. Save the plugin. The code is removed from the settings after successful pairing.
7. Return to ChatRex and wait for the **Connected** status.

A code can be used only once. If it expires or you change the commerce provider, disconnect the previous installation and generate a new code.

## Catalog synchronization

The plugin sends published items in bounded batches and resumes an unfinished synchronization on a later run. Configure the interval in the plugin settings; the minimum interval is five minutes.

After the first synchronization, verify the store, provider, language, currency, and last synchronization time in ChatRex.

## Add assistant actions

Open the bot, go to **Integrations and actions**, and add any of these actions:

- **Search Joomla products** — searches by name, SKU, category, and attributes;
- **Get Joomla product** — returns a product, variants, prices, currency, inventory, and public URL;
- **Check Joomla inventory** — checks the current price and inventory of a product or exact variant;
- **Get Joomla product URL** — returns the verified public storefront address.

Use the exact product and variant identifiers returned by search. If a product has multiple variants, ask the customer to choose the required option before checking inventory. Do not combine inventory across variants.

## Test the connection

1. Find a published product with multiple variants.
2. Compare its title, SKU, price, and currency with the storefront.
3. Select one exact variant and check its inventory.
4. Open the returned product link in a separate tab.

If the product does not appear, confirm that it is published in the selected provider and wait for the next synchronization.

## Update and disconnect

Install plugin updates through Joomla **System → Update → Extensions**.

To disconnect, open Joomla Commerce in ChatRex and select **Disconnect**. You can then disable or uninstall the plugin in Joomla. Disconnecting removes the synchronized catalog from ChatRex.

A separate paid ChatRex Joomla Commerce integration subscription is required.

## License

The **System - ChatRex** Joomla plugin is distributed under the [GNU General Public License, version 2 or later](https://www.gnu.org/licenses/old-licenses/gpl-2.0.html). The separate ChatRex cloud service is governed by the [ChatRex Terms of Service](<../../Legal/Terms of Service.md>).
