The CSV export tool can be adapted to individual needs. For this the file ‚config/config.php‘ has various settings. Further requirements can be implemented promptly.
- Setting the language
- Add new language
- Limit of records for csv export
- Text qualifier for the CSV export
- Field delimiter for the CSV export
- Blacklist / Whitelist for tables (Extended Version)
- Saving from created queries (Extended Version)
- Adjustments for XML export (Extended Version)
Setting the language
In the ‚config / config.php‘ file language is defined. By default, German or English can be set.
Search in file ‚config/config.php:
//Language (de|en)
define('LANGUAGE', 'de');
And replace for German: define(‚LANGUAGE‘, ‚de‘);
Or replace for English: define(‚LANGUAGE‘, ‚en‘);
Add new language
The system use for each language a language file.
In order to translate the frontend in French, the German language file ‚config/config_lang_de.php‘ should be copied and saved under ‚config/config_lang_fr.php‘ in the same directory.
The new file ‚config /config_lang_fr.php ‚you find all translatable constants.
Example:
Constant ‚define (‚ MENUE_BUTTON_HIDE ‚,‘ Hide ‚);‘ is to ‚define (‚ MENUE_BUTTON_HIDE ‚,‘ Cacher ‚);‘
In the ‚config/config.php‘ file the new language can defined after the translation of all constants:
//Language (de|en|fr)
define('LANGUAGE', 'fr');
Limit of records for the csv export
The determination of the number of records to be exported can be useful for performance with very large tables.
Search in the file ‚config / config.php:
//CSV-Export: Limit datasets (type '0' for unlimit)
define('LIMITQUERY', '500');
To export all the records is defined ‚0‘ for QUERY LIMIT. Depending on the scope of the databases or database structure may cause the server timeouts or misconduct by the browser. In these cases, a limit should be set. For a given limit can be accessed on all data sets by using the filter options yet.
Text qualifier for the CSV export
Search in the file ‚config/config.php:
//CSV-Export: Fields enclosed by
define('CSV_FIELDS_ENCLOSED_BY', '"');
Replace if necessary the sign for text recognition. The character is defined away from all data fields in the export. We recommend the characters‘ „‚or“‚ „.
Field delimiter for the CSV export
Search in the file ‚config/config.php:
//CSV-Export: Fields seperated by
define('CSV_FIELDS_SEPERATED_BY', ';');
Replace if necessary the sign for field boundary. We recommend the character ‚;‘ or ‚,‘.
Blacklist / Whitelist for tables (Extended Version)
For a better overview, or if only certain tables in the database to be available, the presentation of the tables can be restricted on a blacklist or whitelist system. In a very large database can be reduced for a better performance here, the number of submitted form data. So it will save you possibly also increasing the variable ‚max_post_size‘.
So only the relevant data are provided for example for a particular employee.
Search in the file ‚config/config.php‘:
//Blacklist / Whitelist Modus (none | blacklist | whitelist)
$table_list_mod = "none";
//Blacklist / Whitelist Tables
//i.g. $table_list_tables = array("customers", "customers_basket", "customers_basket_attributes");
$table_list_tables = array("customers", "customers_basket", "customers_basket_attributes");
none: all tables in the database are displayed.
blacklist: The specified tables are not displayed.
whitelist: Only the specified tables are displayed.
In the array of variables $ table_list_tables the required tables are defined.
Saving created queries (Extended Version)
Some queries are to be performed at regular intervals. These created queries can be saved under a specific name. Subsequently, the query can be executed repeatedly.
Tip for MySQL professionals: Each created query is stored in a file (data / xxxxx). The query in this file can also be manually (eg via FTP) to be changed / adjusted. So also write access to the database is possible. Application scenarios: increase all rates of a particular group by 10 percent. Change the status of newly received orders. Reset all passwords. Etc.
If queries are not saved, which is usually due to a lack permissions. The „data“ directory including the files must be writable.
Adjustments for XML export (Extended Version)
Compression of XML data
Search in the file ‚config/config.php‘:
//compress XML data (yes | no)
define('XMLDATACOMPRESS', 'Yes');
yes -> data is compressed | no -> data is not compressed
Definition of the structure of the XML data
Search in the file ‚config/config.php‘:
//define XML structure
define('XML_VERSION', '<?xml version="1.0" encoding="utf-8"?>');
define('XML_PARENT_NODE_OPEN', '<xmlfile>');
define('XML_PARENT_NODE_CLOSE', '</xmlfile>');
define('XML_CHILD_NODE_OPEN', '<record>');
define('XML_CHILD_NODE_CLOSE', '</record>');
Here the XML version and the definition of the parent and child nodes can be specified.