# PrestaShop

:::tip Available
This integration is active and ready to use on all Pro plans.
:::

Connect your PrestaShop store to Frihet. Import products and orders directly from the Webservice API.

## What does it do?

With PrestaShop integrated:

- **Import orders** — Orders from your store are converted into invoices in Frihet
- **Import products** — Bring your PrestaShop catalog to unify management
- **Synchronized data** — Prices, quantities, references, and statuses are automatically imported

## Requirements

- **PrestaShop 1.7 or higher** — With Webservice enabled
- **API key** — Generated from the administration panel
- **HTTPS mandatory** — Your store must have an SSL certificate
- **Frihet Pro or higher**

## Configure the connection

### Step 1: Generate an API key in PrestaShop

1. In your PrestaShop administration panel, go to **Advanced Parameters** → **Webservice**
2. Click on **Add new key**
3. Activate read permissions (GET) for:
   - `products` — To import products
   - `orders` — To import orders
   - `customers` — For client data
4. Copy the generated key

### Step 2: Connect in Frihet

1. In Frihet, go to **Settings** → **Integrations**
2. Search for **PrestaShop** and click
3. Enter your **store URL** (e.g.: `https://mystore.com`)
4. Paste the **API key**
5. Click on **Test Connection** to verify
6. If correct, click on **Save**

## Import data

### Import products

1. Go to **Settings** → **Integrations** → **PrestaShop** → **Data** tab
2. Click on **Import products**
3. Frihet imports all active products from your store
4. Duplicate products (same SKU or name) are automatically skipped

### Import orders

1. In the same **Data** tab, click on **Import orders**
2. The first import fetches orders from the last 30 days
3. Subsequent imports only fetch new orders since the last synchronization
4. Each order generates an invoice with the format `PS-{id}`

## Imported data

### Products

| PrestaShop Data | Frihet Data |
|-----------------|-------------|
| Name | Product name |
| Referencia | SKU |
| Price (without tax) | Unit price |
| Short description | Description |
| Active (yes/no) | Active/inactive status |

### Orders

| PrestaShop Data | Frihet Data |
|-----------------|-------------|
| Order ID | Invoice number (`PS-{id}`) |
| Order date | Issue date |
| Order products | Invoice lines |
| Cantidad | Quantity |
| Unit price (without VAT) | Unit price |
| Order reference | Invoice notes |

## Real-world example

### Order in PrestaShop

```
Order #4521 - Feb 18, 2026
- 3x Basic T-shirt (ref: CAM-001) @ €15 = €45
- 1x Premium Sweatshirt (ref: SUD-010) @ €45 = €45
Total: €90 + €18.90 VAT (21%) = €108.90
```

### In Frihet after import

```
Invoice PS-4521
Date: Feb 18, 2026
- 3x Basic T-shirt @ €15 = €45
- 1x Premium Sweatshirt @ €45 = €45
Subtotal: €90.00
VAT (21%): €18.90
Total: €108.90
Status: Paid
```

## Differences with WooCommerce

| Feature | PrestaShop | WooCommerce |
|---------------|------------|-------------|
| Connection type | API Key (Webservice) | Consumer Key + Secret |
| Real-time sync | No (manual import) | Yes (webhooks) |
| Direction | PrestaShop → Frihet | WooCommerce → Frihet |
| Invoice format | `PS-{id}` | `WC-{number}` |

## Limitations

- **Manual import** — Orders are not synchronized in real-time. You must click "Import orders" periodically
- **Read-only** — Frihet imports data from PrestaShop but does not write back
- **No address data on invoices** — Order shipping data is not transferred to the client (coming soon)

## Troubleshooting

### "Connection error during test"

- Verify that the URL is correct and uses `https://`
- Check that Webservice is enabled in PrestaShop
- Verify that the API key has read permissions for `products`, `orders`, and `customers`
- If you use a firewall or `.htaccess`, make sure it doesn't block `/api/`

### "Not all products are imported"

- Only **active** products are imported (status = 1)
- Existing products with the same SKU or name are skipped (deduplication)

### "Orders are not appearing"

- The first import fetches only the last 30 days
- Verify that orders have "processing" status or higher
- Click "Import orders" again if new ones have arrived

### "Can I disconnect without losing data?"

Yes. Products and invoices already imported remain in Frihet. Disconnecting only prevents new imports.

To disconnect:

1. Go to **Settings** → **Integrations** → **PrestaShop** → **Configuration** tab
2. Click on **Disconnect**
3. Confirm

## Next steps

- [Connect WooCommerce if you also have a WordPress store](./woocommerce)
- [Import sales from Gumroad](./gumroad)
- [Automate workflows with n8n](./n8n)
---
