Laravel/Change configuration

From Aimeos documentation

Laravel
Other languages:
English 100%


The core library contains a lot of configuration options documented in the Configuration section that can be changed in the config/shop.php file and they are displayed in the documentation like this:

client/html/catalog/filter/default/button = 1

Laravel uses normal PHP arrays for configuration. As a rule of thumb, replace each part separated by a slash (/) by "'..' => array('...'),":

  1. 'client' => array(
  2.     'html' => array(
  3.         'catalog' => array(
  4.             'filter' => array(
  5.                 'default' => array(
  6.                     'button' => 1,
  7.                 ),
  8.             ),
  9.         ),
  10.     ),
  11. ),

Value lists

The same works with arrays of values as well. Since PHP 5.4 you can also use the short syntax with the square brackets ([ and ]):

  1. 'client' => array(
  2.     'html' => array(
  3.         'catalog' => array(
  4.             'filter' => array(
  5.                 'default' => array(
  6.                     'subparts' => ['search', 'tree', 'attribute'],
  7.                 ),
  8.             ),
  9.         ),
  10.     ),
  11. ),

Quoting

All keys and values must be enclosed in single quotes ('):

  1. 'test' => 'my test value'

Some values can contain a dollar sign, which would be interpreted as variable if enclosed in double quotes. Thus, it's better to always use single quotes!

  1. 'test' => '%1$s%2$s'

Area specifc

Sometimes it's necessary to apply configuration settings only to the frontend, the admin backend or the CLI commands. Aimeos currently supports three areas:

  • command
  • backend
  • frontend

The ./config/shop.php configuration file can contain sections with settings only for these areas. Inside these sections, you can add all configuration options available, e.g.

  1. 'command' => array(
  2.     'madmin' => array(
  3.         'log' => array(
  4.             'manager' => array(
  5.                 'standard' => array(
  6.                     'loglevel' => 7
  7.                 ),
  8.             ),
  9.         ),
  10.     ),
  11. ),
  12. 'backend' => array(
  13.     'madmin' => array(
  14.         'log' => array(
  15.             'manager' => array(
  16.                 'standard' => array(
  17.                     'loglevel' => 5
  18.                 ),
  19.             ),
  20.         ),
  21.     ),
  22. ),
  23. 'frontend' => array(
  24.     'madmin' => array(
  25.         'log' => array(
  26.             'manager' => array(
  27.                 'standard' => array(
  28.                     'loglevel' => 4
  29.                 ),
  30.             ),
  31.         ),
  32.     ),
  33. ),