Install 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.
Before you can install Commerce SDK, you must install and configure Cohesivo.
Install package¶
Run the following command to add Commerce SDK to your project:
1 | |
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:
1php bin/console ibexa:doctrine:migrations:versions -
To preview the changes before you apply them, use
--dry-runwith--write-sql:1php bin/console ibexa:doctrine:migrations:migrate --dry-run --write-sql=var/migration-preview.sql
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:
1php bin/console ibexa:doctrine:migrations:migrateThis command applies all pending migrations for the project.
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:
1 | |
Then, to apply it, run the same command without the --dry-run option:
1 | |
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
- Configure payment
- Configure shipping
- Configure storefront
- Configure order management
- Configure discounts
- Configure shopping list
Add transactional emails¶
You can further extend Commerce SDK with transactional emails, by installing the Actito connector add-on. For more information, see Transactional emails.