# Install Commerce SDK

> For the complete documentation index, see [llms.txt](https://doc.ibexa.co/en/6.0/llms.txt).

Install the Commerce SDK on top of Cohesivo to add e-commerce capabilities to your project.

Editions: Commerce SDK

Commerce SDK adds e-commerce capabilities, such as cart, checkout, payments, shipping, order management, discounts, and shopping lists, to Cohesivo. For more information, see [Commerce SDK product guide](https://doc.ibexa.co/en/6.0/ibexa_products/commerce_sdk/index.md).

Before you can install Commerce SDK, you must [install and configure Cohesivo](https://doc.ibexa.co/en/6.0/getting_started/install_cohesivo/index.md).

## Install package

Run the following command to add Commerce SDK to your project:

```bash
composer require ibexa/cohesivo-commerce-sdk
```

The associated Symfony Flex recipes configure the bundles and their routes.

## Modify database schema

Ibexa Doctrine migrations manage the database schema for the Commerce SDK packages.

- To see a list of known migrations, and find out which ones are pending for the whole project, run:

  ```bash
  php bin/console ibexa:doctrine:migrations:versions
  ```

- To preview the changes before you apply them, use `--dry-run` with `--write-sql`:

  ```bash
  php bin/console ibexa:doctrine:migrations:migrate --dry-run --write-sql=var/migration-preview.sql
  ```

> **Caution: Preview only**
>
> This generates an SQL file that is only intended for review. More recent migrations can be unaware of changes made by earlier migrations in the same run, so the file may be incomplete. Do not run the SQL file against your database.
>
> Always apply changes by running the command without the `--dry-run` flag.

- To apply pending migrations:

  ```bash
  php bin/console ibexa:doctrine:migrations:migrate
  ```

  This command applies all pending migrations for the project.

> **Tip: Apply migrations one by one**
>
> Instead of applying all pending migrations at once, you can go through them one at a time. To preview only the next pending migration, run:
>
> ```bash
> php bin/console ibexa:doctrine:migrations:migrate next --dry-run
> ```
>
> Then, to apply it, run the same command without the `--dry-run` option:
>
> ```bash
> php bin/console ibexa:doctrine:migrations:migrate next
> ```
>
> Repeat these steps until no pending migrations remain. To check which migrations are still pending, run `php bin/console ibexa:doctrine:migrations:status`.

## Configure features

Some Commerce SDK features require additional configuration, for example:

- [Configure checkout](https://doc.ibexa.co/en/6.0/commerce/checkout/configure_checkout/index.md)
- [Configure payment](https://doc.ibexa.co/en/6.0/commerce/payment/configure_payment/index.md)
- [Configure shipping](https://doc.ibexa.co/en/6.0/commerce/shipping_management/configure_shipment/index.md)
- [Configure storefront](https://doc.ibexa.co/en/6.0/commerce/storefront/configure_storefront/index.md)
- [Configure order management](https://doc.ibexa.co/en/6.0/commerce/order_management/configure_order_management/index.md)
- [Configure discounts](https://doc.ibexa.co/en/6.0/discounts/configure_discounts/index.md)
- [Configure shopping list](https://doc.ibexa.co/en/6.0/commerce/shopping_list/configure_shopping_list/index.md)

## Add transactional emails

You can further extend Commerce SDK with transactional emails, by installing the Actito connector [add-on](https://doc.ibexa.co/en/6.0/ibexa_products/cohesivo_products/#add-ons). For more information, see [Transactional emails](https://doc.ibexa.co/en/6.0/commerce/transactional_emails/transactional_emails/index.md).
