> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://doc.common-services.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Preamble (Cdiscount)

## Compatibility

The 4.5 branch of the Cdiscount Marketplace module is compatible with PrestaShop **1.7 to 9.x**.

Always use the latest module version provided by Common-Services (Addons or support update link).

## Pre-configuration

By default, the original configuration fits most common needs.
Only change advanced settings if necessary, and only if you understand the impact.

## Where to find the module

Once installed and configured, you will find the module here:

- **Modules > Module Manager > Cdiscount** (Configure): full configuration (Credentials, Models, Profiles, Categories, Transport, Settings, Cron, etc.)
- **Catalog > Cdiscount**: product creation (Product Integration) and offer send/update (Offer Integration)
- **Orders > Cdiscount**: order acceptance and import
- **PrestaShop product sheet**: **Cdiscount** sub-tab (optional options: forced price, forced stock, delay, offer comment, etc.)

## Read this before configuring

1. [Understanding the Difference Between Offers and Products (Cdiscount)](https://doc.common-services.com/en/article/understanding-the-difference-between-offers-and-products-cdiscount-o52afn/)
2. [Validate your catalog structure (Cdiscount)](https://doc.common-services.com/en/article/validate-your-catalog-structure-cdiscount-1trq16m/)
3. Then the **Configure** section (install → Octopia connection → models → profiles → categories → transport)

## Octopia connection

The module connects to the marketplace through **Octopia** (Cdiscount API).
You will need a **Client ID**, a **Client Secret**, and a **Seller ID**.

See: [Configure the connection settings (Cdiscount)](https://doc.common-services.com/en/article/configure-the-connection-settings-cdiscount-yepdmf/)

## Profiles and Models

The module is built around two concepts:

- **The Model**: defines the **Cdiscount category / taxonomy** and expected fields (features, attributes, variants). This is where you choose the marketplace category.
- **The Profile**: applies **business rules** (price, shipping, stock, preparation time, CDaV, etc.) and is linked to a model. In the **Categories** tab, you link your PrestaShop categories to a profile.

> 💡 In short: the Cdiscount category is configured in the **Model**. The **Profile** carries the export rules. The **Categories** tab links your PrestaShop categories to the chosen profile.
>
> The model is mainly required for **product sheet creation**. To publish offers only on already known products (EAN matching), a correctly configured profile + transport can be enough.

## EAN / GTIN codes

The module works in **matching** and **creation** modes:

- If the EAN already exists on Cdiscount/Octopia → your **offer** can be linked to it (matching).
- If the EAN is unknown → you must first **create the product** (Product Integration), then send the offer.

Private / local codes (e.g. 200…, 000…) or non-GS1 codes are prohibited.

> ⚠️ Important: **GTIN/EAN is mandatory** for any product creation. No exemption is granted by Octopia/Cdiscount.

## Recommended first go-live path

1. Install the module and save the configuration
2. Connect Octopia (Credentials)
3. Create at least one **Model** + one **Profile**
4. Check the PrestaShop **Categories** and assign the profile
5. Configure **Transport** (modes + ChargeMin)
6. Decide: product creation (if EAN unknown), then **Full Package** for offers
7. Configure **scheduled tasks** (cron)