After upgrade config.local.php had changes what does this mean

After upgrade from 2.1.2 to 2.1.3 the config.local.php had changes, the changes are the following text is inserted :



// Maximum number of files, stored in directory. You may change this parameter straight after a store was installed. And you must not change it when the store has been populated with products already.

define(‘MAX_FILES_IN_DIR’, 1000);

$config[‘vendor_index’] = ‘vendor.php’;



What does this mean?

Hello, maxam



The following part of the code:

```php define(‘MAX_FILES_IN_DIR’, 1000); ```

defines the maximal number of images that can be stored in sub-directories of the “images” directory of your CS-Cart installation.



The following part of the code:

```php $config[‘vendor_index’] = ‘vendor.php’; ```

defines the script that is executed when accessing the vendor panel.

Why did this code only appear in my config.local.php only after the upgrade.



Does this mean that I have to decide right now how may images are stored in sub-directories of the “images” directory of my CS-Cart installation as I am not sure how many that will eventually be, as it states



You may change this parameter straight after a store was installed. And you must not change it when the store has been populated with products already.



At the present time I have only the Basic skin demo images available in the storefront.



Regarding this code : $config[‘vendor_index’] = ‘vendor.php’;

I am running the Professional version of the software so does this apply

[quote name=‘maxam’]Why did this code only appear in my config.local.php only after the upgrade.



Does this mean that I have to decide right now how may images are stored in sub-directories of the “images” directory of my CS-Cart installation as I am not sure how many that will eventually be, as it states



You may change this parameter straight after a store was installed. And you must not change it when the store has been populated with products already.



At the present time I have only the Basic skin demo images available in the storefront.



Regarding this code : $config[‘vendor_index’] = ‘vendor.php’;

I am running the Professional version of the software so does this apply[/QUOTE]



Hello, maxam



Thank you for your reply.

Please let me explain.



The PHP Code:


define('MAX_FILES_IN_DIR', 1000);




was added since the version 2.1.3. That is why you see it after the upgrade.

It was added, because most of the servers have the option, which limits the quantity of the files in the subdirectory. If you do not have a such option on your server you can leave the default option.



As for the PHP Code:


$config['vendor_index'] = 'vendor.php';




It will be used, if you upgrade your store to the Multi-vendor edition.



Thank you.

Have I got this right



So if I change the following part of the code:



PHP Code:

define(‘MAX_FILES_IN_DIR’, 1000);



To:



PHP Code:

define(‘MAX_FILES_IN_DIR’, 20000);



I could store a total of 20000 product images which would be stored in images sub directorys such as images/product and images/thumbnails and images/detailed otherwise I could only store 1000 product images if I use the default setting.



What is the maximum number of product images recommended.



Can this code be changed at upgrade without affecting the images and products in the store.

[quote name=‘maxam’]Have I got this right



So if I change the following part of the code:



PHP Code:

define(‘MAX_FILES_IN_DIR’, 1000);



To:



PHP Code:

define(‘MAX_FILES_IN_DIR’, 20000);



I could store a total of 20000 product images which would be stored in images sub directorys such as images/product and images/thumbnails and images/detailed otherwise I could only store 1000 product images if I use the default setting.



What is the maximum number of product images recommended.



[/QUOTE]



Hello maxam,



No, it’s not quite right.

There is no limit on the images quantity. The limit is on the quantity of the file in the subdirectory. If you add more images, the system just create the additional subdirectories.


[QUOTE]

Can this code be changed at upgrade without affecting the images and products in the store.

[/QUOTE]



Unfortunately it is impossible. You need to define this parameter one time after the store installation.



Thank you.