Slim/Install Aimeos

From Aimeos documentation

Other languages:
English 100%

This guide assumes a directory layout as used in the Slim skeleton application created by:

composer create-project slim/slim-skeleton [my-app-name]

The Aimeos Slim e-commerce package is a composer based library that can be installed easiest by using Composer. Add these lines to your composer.json of your Slim project:

  1. "prefer-stable": true,
  2. "minimum-stability": "dev",
  3. "require": {
  4.     "aimeos/aimeos-slim": "~2017.07",
  5.     ...
  6. },

Afterwards, install the Aimeos shop package using

composer update

The next step is to copy the required configuration and route files to your ./src/ directory so you have your own copy you can modify according to your needs. When you upgrade from a previous version, you should have a backup of these files. You can then reapply the changes you've made in the past to the updated files.

cp vendor/aimeos/aimeos-slim/src/aimeos-settings.php src/
cp vendor/aimeos/aimeos-slim/src/aimeos-routes.php src/

To configure your database, you have to adapt the configuration in ./src/aimeos-settings.php file and modify the settings in the resource section. Setting up or upgrading existing tables in the database is done via:

php vendor/aimeos/aimeos-core/setup.php --config=src/aimeos-settings.php --option=setup/default/demo:1

In a production environment or if you don't want that the demo data is added, leave out the --option=setup/default/demo:1 option.

You must also copy the Aimeos templates to the ./templates/ directory of your Slim application. Thus, you can modify them according to your needs and they won't be overwritten by the next composer update:

cp -r vendor/aimeos/aimeos-slim/templates/* templates/

The last step is to publish the Aimeos theme files to the ./public/ directory, so they are available via HTTP:

mkdir -p public/aimeos/themes/
mkdir -p public/aimeos/extjs/lib/
mkdir -p public/aimeos/admin/extjs/lib/
cp -r vendor/aimeos/aimeos-core/client/html/themes/* public/aimeos/themes/
cp -r vendor/aimeos/aimeos-core/admin/jqadm/themes/* public/aimeos/themes/
cp -r vendor/aimeos/aimeos-core/admin/extjs/lib/* public/aimeos/extjs/lib/
cp -r vendor/aimeos/aimeos-core/admin/extjs/lib/* public/aimeos/admin/extjs/lib/

Afterwards, you can continue to set up the enviroment for the Aimeos package.

<< Previous: Upgrade from previous versions | Next: Setup the Slim environment >>