Understanding the Advanced Parameters
This page serves as a handy reminder of your PrestaShop configuration: version, server info, PHP version, a MySQL version. All these prove really useful when you need to report an issue to the PrestaShop developers, or simply your webmaster or web host.
There is one last section, titled "List of changed files". Right after you have first installed PrestaShop, the only thing that this section displays is "No change has been detected in your files".
But after you've installed some modules and a couple of themes, made advanced changes to some override classes or deleted files altogether, this list will show the difference between your current installation of PrestaShop and what it used to look like in its pristine state. This helps you see what changes have been made to your installation... and therefore what to take into account if you want to update your store manually, or if you are moving files to a new server.
Even with a fresh installation, this section might indicate "
CONTRIBUTORS.md" or "
README.md" as missing files. These are Git-specific files, and PrestaShop does not use them, so you should not worry about them.
This page combines many tools and tips that might help you improve your shop's performance server-wise – not sales-wise, although a server that performs well is able to serve more customers, and therefore make more sales.
Smarty is the name of the template language used by PrestaShop's themes. You can learn more about it at http://www.smarty.net/.
There are four options:
- Template cache. For better front-end performance, PrestaShop caches your HTML pages.
- Never compile cache. Only enable this if you are making edits theme, and need to see your changes every time you reload your page.
- Compile cache if templates are updated. PrestaShop is able to see when a theme file has changed, but this might not always work as expected.
- Force Compile. The normal behavior: HTML pages are compiled and cached, even if the theme has changed.
- Cache. This option makes it possible for you to disable all file caches, and not just the one pertaining to template files. Only disable this if you debugging a theme or a module for PrestaShop. Otherwise, you should leave it enabled.
The "Clear Smarty cache" appeared in PrestaShop 220.127.116.11, and makes it possible to delete the cache in a single click instead of having to go delete files on your FTP server.
- Debug console. New in 1.5. PrestaShop enables you to display the Smarty Debug Console, which gives you valuable information on a template page. Read more about it at http://www.smarty.net/docsv2/en/chapter.debugging.console.tpl. Note that the console opens in a pop-up window: make sure to make your browser allow them for your shop's domain name.
- Do not open console. The default setting. No one sees the console, not even you.
- Open console with URL parameter (SMARTY_DEBUG). The console is only displayed if you add
?SMARTY_DEBUGat the end of the URL (or the key of your choice, see below). This is great, but once your tests are done, do revert to the default setting, as this "trick" is known and some hackers could make use of it.
- Always open console. The "full on" setting. Everyone who has access to your shop can see the console. Therefore, keep it for maintenance sessions.
- Debug console Key. You can change the key in order to be the only one to know what key to enter in order to display the debug console.
Because the debugging console might display private information, make sure to only enable it when in maintenance mode. Do not keep it enable on a production store.
New in 1.5.
Some PrestaShop features can be disabled if you do not use them, as they can slow down your shop.
If your catalog currently has products which make use of these features, then you will not be able to disable them. You will have to delete some data before you can turn them off.
You can disable the following catalog features:
- Combinations. Product combinations enable you to have a whole product line out of a single product: varying size, colors, capacity, etc.
- Features. Product features enable you to indicate the product's specific information: weight, material, country of origin, etc.
Combine, Compress and Cache (CCC)
CCC is a set of tools aimed at minimizing server load and theme loading time.
It does what it says: it combines textual files of the same type into one bigger files, which makes for fewer files to download; it then compresses the file using the common Zip algorithm, which makes for faster downloads; finally, it caches the compressed file, so that the server does not have to do this process every time a page is loaded, which relieves the burden on the server's processor.
Your theme must completely compatible with at least PrestaShop 1.4, otherwise CCC will not work as expected. This is why most options are disabled by default.
- Smart cache for CSS. CSS files are text-based, and can be safely combined and compressed.
- Minify HTML. The HTML code generated by Smarty can be minified, meaning that PrestaShop will remove all whitespace in order to save a few bytes. This is mostly safe.
- High risk HTML compression. This option is marked as "high risk" because while the HTML code is very much compressed, it will not respect web-standards anymore. Use this at your own risk: some search engines do not deal well with websites that do not respect HTML standards, and this might make you lose your position in search results. Use with caution.
- Apache optimization. This setting will change your Web server's configuration file in order to make them more efficient for CCC.
This section enables you to redirect part of your traffic (image and video files, for instance) to other servers under your control, through other domains or sub-domains – most often, the files are hosted on a CDN (Content Delivery Network). By default, PrestaShop supports up to 3 media servers.
Putting your store's domain name in those fields is not the proper way to get fantastic performance. That being said, it is easy to set up a media server, and the benefits are real and almost immediate. Here is how:
- Open an account at a new host, preferably one who is specialist of distributed content. The most popular are Akamai (http://www.akamai.com/), Amazon (with its AWS services, among which is CloudFront: http://aws.amazon.com/) or CloudFlare (http://www.cloudflare.com/). You should also ask your own host, maybe it has a CDN service you can subscribe to.
- Copy your media files to that host's server. This means that the CDN server must contain an exact copy of the following folders from you store's main server:
Reminder: you must make it so that these folders are always synchronized: even if you you add new products or change your theme, the CDN server must contain the latest version of all these files.
- Once the CDN server is in place, add the web address (as given by your CDN host) in the first field, "Media server #1". If that host allows for more web addresses, add them.
In case you would rather that your files are still visually downloaded from your domain name rather that from an unknown domain name, follow this process:
- Create a subdomain for your store's domain name, for instance
(the way to do that depend on your host, ask him about it).
.htaccessfile at the root of the subdomain. That file should contain a single line:
with the one from your CDN server. This way, you are creating an automatic redirection from your subdomain to your CDN server.
- Once the subdomain is in place, add it in the first field, "Media server #1". If that host allows for more web addresses, create as many subdomains to your store's main domain name.
Cyphering means encrypting data so as to render it unreadable to unwanted eyes. Your costumers' account details, as well as your own, are protected by cyphering.
Here you can choose the algorithm you prefer:
- Use Rijndael with mcrypt lib. Default choice. Fast and secure.
- Keep the custom BlowFish class. Better security, but performance takes a toll, as it takes more time to validate the authentication, for each page load. Your customers might appreciate the added security, but might not like the time spent waiting for the page to load – although the time difference is really unnoticeable to most.
Therefore, choose wisely.
Your server's cache stores static versions of your dynamic web page, in order to serve these to your customers and thus reduce server load and compiling time.
Most of the time, you should first check with your web host about this setting, as it requires special settings on the server.
This section enables you to choose to enable caching, and choose the caching method:
- Memcached. A distributed caching system. Very effective, above all with multiple servers, but you need to make sure that your servers/hosts support it – most probably, if your PHP configuration features the Memcached PECL extension, you are good to go (you can download it here: http://pecl.php.net/package/memcache). You can add Memcached servers by clicking on the "Add server" link.
- APC. Alternative PHP Cache is free, open and robust, but only works with one server – which is the usual case when you start your online business. Again, check for the availability of the APC PECL extension on your server: http://pecl.php.net/package/APC.
- Xcache. Xcache is a new cache system, which is specific to the Lighttpd server – hence, it will not work with the popular Apache server. Read more about it at http://xcache.lighttpd.net/.
- File system. The static files are simply stored as any other file, on your server.
The last three options display a field set to "1" by default. This is the file-system directory depth. Only change this value when you know what you are doing.
The first setting, "Send e-mail to", is a front-end one. At the end of the checkout process, a client can leave a message to you staff. You can choose to whom this message will be sent by selecting from the drop-down list.
Next in the "E-mail" section are settings: configure PrestaShop to send emails to your customers. We strongly advise you that you consult your web host to determine which settings to use for this feature.
Your shop sends many messages throughout all the steps of registration and placing an order. Here, you can configure how these messages will be sent. By default, it is advisable to use the first option of sending information to "Use the PHP mail() function".
In the event that this does not work, then use the second option, "Set my own SMTP parameters". In this case, a new section appears, with more fields. The information for these fields should be provided by your web host: mail domain name, SMTP server, SMTP user, etc. Make sure to transcribe exactly what your web host provides you with.
The configuration information can be provided to you either by:
- Your system administrator
- Your host
- Your ISP
- Your e-mail provider.
Your web host can tell you whether or not your username is mandatory, as well as the password information, and the encryption to use.
For example, in the case of Gmail (the e-mail service offered by Google), you might have to enter information such as the following one:
- SMTP server: smtp.gmail.com
- User: email@example.com (example)
- Password: RT22UE87 (example)
- Encryption: SSL
- Port: 465
Test your email configuration
Once you have configured your e-mails using one of the two available methods, enter your own e-mail address in this section, then click the "Send an e-mail test" button.
Now check the inbox of the address provided to verify that you indeed have received the test e-mail. If you have not received it, update your configuration with the correct information.
This page is only available when you enabling the multistore feature.
Turning your single-shop PrestaShop installation into a multi-shop one is very simple:
- Go to the "Preferences" menu and select the "General" page.
- Find the "Enable multistore" option, select "Yes".
- Save your changes.
The "Advanced Parameters" menu will now feature the "Multistore" page, which is presented in details in the "Managing multiple shops" chapter of this guide.
CSV is an acronym of "Comma-separated values". It is an popular plain-text format when there is a need to import, export or simply store data in a non-proprietary format. Almost all data handling tool support CSV format, in various incarnations. You can read more about the CSV format on Wikipedia: http://en.wikipedia.org/wiki/Comma-separated_values.
The CSV import page enables you to easily fill your product catalog when you have a very large amount of products, or to import data that you exported and converted from another e-commerce tool.
The import process requires preparation, and starts with a form made of primary settings:
- Your CSV file. You can import more than one file at a time, but make sure that they all have the same type of data.
There is a "Click to view our sample import csv files" link right below the "Upload" button. Click it to display more links: you can download sample files for each type of data, which helps you make sure that the files you are about to import are indeed ready to be imported to PrestaShop. These files are actually in the
/docs/csv_importfolder of your installation of PrestaShop.
- What kind of Entity would you like to import?. Entities are the types of data that you can import. PrestaShop enables you to import these types of data:
- Combinations (which was called "versions" in versions of PrestaShop prior to 1.5),
- Supply order (if Advanced Stock Management is enabled),
- Supply order details (if Advanced Stock Management is enabled).
- Language of the file. Data can only be imported for a single language at a time. If your data exists in more than one language, you should split it into as many files.
- ISO-8859-1 encoded file?. By default, the import files should use UTF-8 encoding. But if your files use ISO-8859-1 and you would rather not convert them, you can check this box.
- Field separator. Not all CSV file use commas to separate their values: some use tabulations, others semicolons, etc. You can indicate what your files use in this field.
- Multiple value separator. When an attribute can support more than one value, these values need to be separated with a specific separator. After reviewing your files, indicate your separator here.
- Delete all xxx before import?. This option will erase all previously existing entries of the type of data you are importing. Thus you will start with a clean slate.
- Force all ID's during import. You can either keep the import IDs, or let the importer auto-increment them.
- Use product reference as key?. Product import only. You can choose to have the product key be determined by PrestaShop, or instead use the product's reference as the ID. In this case, make sure the file does contain references for all your importer products.
When changing the Entity setting, the section on the right, titled "Available fields", changes to present the expected data fields. Although the importing tool helps you by taking care of matching your file's fields with PrestaShop's, you should strive to make your data more import-friendly by following the naming scheme and order of the presented fields. If not, the import will be more tedious, but not impossible.
Some fields have a little information popup available on their right, which you can display by hover the mouse cursor over it. They mostly pertain to PrestaShop's multistore feature. Make sure to read them all in order to better build/edit your data files.
Imported data file must be in text-file, using a CSV-based format and the accompanying
.csv file extension. We recommend using a semicolon ";" as a separator.
You can create such a file using any text editor (we recommend Notepad++: http://notepad-plus-plus.org/), but we do advise you to use a spreadsheet program, then save your work in the CSV format. Using a spreadsheet program enables you to have an easier and more visual grasp of your data, in comparison to the plain text file. You can use the commercial Microsoft Excel (http://office.microsoft.com/en-us/excel/ or the free OpenOffice.org http://www.openoffice.org/ Calc.
Here is a sample import file, for a list of products:
Note that this is only a regular sample files built for this demonstration; it is purposefully not optimized for PrestaShop importation. If you need a sample file you can learn from, use the ones you can download from the "Upload" button's form.
The first row should be a descriptive name for the data column (you will be able to skip it during the import process). There must be the same number of columns on each row.
You should remember that:
- The price column will use your store's default currency.
- Categories are to be specified using their existing IDs (so you should have imported them first), and separated with a comma (by default).
- The URL of the image must be specified in full. In other words, the link that may be used in a web browser in order to display the image. For instance: http://www.myprestashop/images/productXXX.gif.
- The file's character encoding should be UTF-8, or ISO-8859-1 at worst.
- Dates use the ISO 8601 format, without a time zone designator (the time zone is the one for your store):
Uploading the file
Once you have all your data in CSV format, you can upload them to your store's database using the form in this page. Choose your file(s) from your computer by clicking on the "Upload" button, click the "Browse" button to find your file, then click the "Upload" button to mark it as chosen. Do this as many times as necessary to list all your import files.
Once your files are all listed in the "Your CSV file" section, you can proceed with the rest of the form:
- Select the type of data contained in your file, using the drop-down list named "What kind of Entity would you like to import?". Once you have selected the type of data, the list of the available fields appears on the right, which helps you refine your CSV file – at least for the order of the columns, which will soon prove handy.
- Select the language of the imported content. If the target language is not available, you must install it first, in the "Languages" page under the "Localization" menu.
- Select the file encoding. Simply indicate if the file uses ISO-8859-1 or not. If not, then it is assumed the files use UTF-8.
- Select the field separators. We suggest that you leave the default values ("field separator" with a semicolon ";", "multiple value separators" with a comma ","). But obviously, if your CSV file is built differently, you should change these values accordingly.
- If you want to remove all the products in your catalog before importing, select the appropriate option.
- Once all your choices have been made, click "Next step".
All import files are uploaded directly in the admin folder's
/import sub-folder. If the CSV File drop-down menu gets too crowded, you can delete old imports directly using your FTP client.
When clicking the "Next step" button, the page reloads with the matching tool. This interface helps you match you file's data columns with the ones required by PrestaShop.
Presented in this table are the rows from your CSV file, placed under arbitrary columns matched to PrestaShop's database needs. It is up to you to make sure that all the columns from your CSV file are matched with the correct column header, using each header's drop-down menu, so as to import your content correctly.
For instance, with our sample file:
- First column. We marked it as "Enabled", PrestaShop presents "ID" as a header. Click on the header's drop-down menu, and select "Active (0/1)".
- Second column. Marked "Name", header indicates "Active (0/1)". Let's change the header for "Name *".
- Third column. You get the idea...
The screen cannot contain all of your data's columns, so click the ">>" and "<<" buttons to move around the columns, and match them all correctly.
In our example, we used the first row for columns indicators. Since we do not this one imported, enter "1" in the "Skip X lines" text-field.
Once you are done matching your columns, click the "Import .CSV data" button (top right of the screen), and PrestaShop will start the importing process. When the process is done, you are sent to the main screen, which should either confirm that everything has indeed been imported, or give you a notice of all the encountered problems. In this second case, you should review your CVS file and make sure to correct everything.
The matching process can be a tedious task if you cannot customize your CSV files columns order according to that used by the PrestaShop importer, and even more so if you have to do that repeatedly or frequently. That is why PrestaShop includes a small tool to save the current matching order that you have set up using all the headers drop-down menus.
The tool is a simple field at the top of the matching tool. You can do the three basic actions:
- Saving. Enter a descriptive name in the field, and click "Save". The interface updates to feature the saved configuration in its drop-down list.
- Loading. Select a matching configuration in the drop-down list, and click "Load".
- Deleting. Select a matching configuration in the drop-down list, and click "Delete".
A backup is the action of saving the content of your database into files that you store in a safe place. The point is that you can revert to them in case your database fails on you.
You must perform regular backups of your shop, so that in case of a crash, you can reboot your shop quickly and in the best conditions. The database contains all the information in your shop, many of which are indispensable for PrestaShop to work correctly – and that's not talking about your products, categories and other data you added since the installation.
The more often you perform backup, the safer you are. Once a week is a minimal frequency.
To create database backups of your shop, you have several solutions. You can use tools such as phpMyAdmin (reserved for advanced users), or use the one integrated into PrestaShop: the "DB backup" page.
The page starts with two big notices. You should read both completely in order to have a better idea of what the page does.
The "Disclaimer" section on the left gives you a series of reminders about backups, which you should read every time you make a backup. The section ends with the "I have read the disclaimer - Create a new Backup" button, which you have to click in order to create a backup. Once created, the backup appears in the list below the notices.
The "How to restore" section on the right gives you tips on how to get your data back into PrestaShop in case of failure. You should commit this to memory, or at least save this information somewhere in case a database crash makes it impossible for you to access the PrestaShop administration – and thus the DB backup page – again.
The table below the notices lists all the backups that have already been made, indicating the date of creation, age, file name and size.
At the right of each row are two icons:
- The 'view' icon enables you to download this backup.
- The 'trash' icon enables you to delete this backup. Be careful, there is no turning back.
After each backup process, you should download the generated backup file by clicking on its "View" icon, or simply by using the link in the notification box at the top.
Your database is saved using the standard SQL format and its
.sql file extension, and compressed using the BZip2 algorithm (simply put, a variant of the popular Zip format. Read more: http://en.wikipedia.org/wiki/Bzip2) and its
.bz2 file extension. That gives a file archive with the
.sql.bz2 file extension.
Put your backup file in a safe place, for you might need it at any given time. Furthermore, you can find these backups directly on your server, in the
/backup folder, under your custom-named
At the bottom of the screen, two options are available:
- Ignore statistics tables. PrestaShop stores your site's statistics in a handful of database tables, and these can grow big quite quickly. While it can be sound to keep your stats in a safe place, they also make for huge files to download, while you are probably more interested in a backup of your products, categories, customers, orders, etc.
By default, PrestaShop backups all tables, but if you are short on disk space on your web server, change this option to "Yes".
- Drop existing tables during import. When importing a backup file, the system can either overwrite the existing live tables with the content of the ones that were backed up, or delete all existing in order to replace them with the content of the backup. The first case can result in doubles, which is why this option is enabled by default.
New in 1.5.
The SQL manager is a complex feature, which should be reserved to technical people who know how to explore a database using the SQL language. In return for this complexity, it can be extremely powerful and prove immensely useful to those who master it.
This tool enables you to perform SQL queries directly on the PrestaShop database, and save them for use at any later time. Indeed, PrestaShop presents its database data in many ways, but you might need something more, or more simply, something rawer than PrestaShop's clean interface. Using the SQL manager you can perform complex queries which build upon tables of data in the way YOU need them.
For instance, using this tool and your knowledge of SQL, you could create a reusable query giving you an updated list of the clients who are subscribed to your newsletter, or get a list of products in HTML or CSV format.
For security reasons, some types of queries are not allowed: UPDATE, DELETE, CREATE TABLE, DROP, etc. In short, you can only read data (SELECT query).
Also, secure keys or passwords are hidden (***********).
Creating a new query
As usual, the "Add New" button leads to the creation form. It has two main fields:
- Name. Make the name as long and descriptive as necessary.
- Request. The SQL query itself. You are free to perform JOINs or other intricate selections.
Additionally, the "List of MySQL Tables" section helps you explore the database, and makes it easier for you to build your queries. It gives you a handy and clickable selector of all the currently available database tables. Select a table to make PrestaShop display its attributes and types, then click "Add attribute" to send its name into the "Request" field.
Saving the form sends you back to the main page, with its list of queries.
Starting a query
Each saved query in the table has four icons to the right of its row:
- Export. Performs the query, and has it downloaded by you in CSV format.
- View. Performs the query, and has it displayed in an HTML table, right within the PrestaShop interface.
- Edit. You can edit a query as often as necessary, in order to refine it and get better results.
- Delete. Once a query is not used anymore (or simply because it does not work), you can delete it by clicking this button and confirming your choice.
There is only one setting at this time:
- Select your encoding file by default. You can configure the character encoding of the downloaded CSV file. The default, UTF-8, is recommended, but you can select ISO-8859-1 if need be.
Some sample queries
The possibilities are endless, but here are a few sample queries to help you build your own.
Listing all the e-mails address of all the customers
Listing all the e-mails address of all the customers who are subscribed to your newsletter
Listing all the products which are active and have a description in French
Listing all the orders, with details about carrier, currency, payment, total and date
Errors happen. Most of the time, you are not aware of them because PrestaShop handles them silently. But you might want to know about them, in order to be able to correct the most regular ones, and insure a better stability for your shop.
The "Logs" page is where you can have a look at the PHP errors which plague your shop. They are listed in the page's central table, and are presented in 4 levels:
- 1: Informative only. Run-time notices. Indicate that the script encountered something that could indicate an error, but could also happen in the normal course of running a script.
- 2: Warning. Run-time warnings (non-fatal errors). Execution of the script is not halted.
- 3: Error.
- 4: Major issue (crash). Fatal run-time errors. These indicate errors that cannot be recovered from, such as a memory allocation problem. The execution of the script is halted.
These explanations are the official ones from the PHP manual. Read more: http://www.php.net/manual/en/errorfunc.constants.php.
These error levels also serve as values for the "Logs by e-mail" feature.
PrestaShop adds one last value, 5, which indicates that the administrator does not want to receive any notification, either for minor or major errors.
The error logging tool enables you to receive a notification when an error occur. Notifications are sent to the shop owner's e-mail address, and you can configure the degree of importance at which you should start receiving such e-mails: use "1" if you want to know about everything, even the tiniest information; "3" if you only want to know about issues (errors and major issues); "4" if you only want to keep the major issues. The default is "5", meaning that no notification is sent.
A Web service is a method of communication between two electronic devices over a network. It relies on a known set of methods, formats and access rights, so as be able to use the webservice's content on any other authorized tool, and build upon the original content. Read more about it on Wikipedia: http://en.wikipedia.org/wiki/Web_service.
In this page, you can enable your shop's webservice, so that third-party tools can access your data. This potentially makes it possible for interesting tools to help you or your customers make better use of your shop (such as mobile applications).
The page starts by listing the currently existing webservice keys in a table. A webservice key is a unique access that you grant to a developer, which can be used to tie a tool to your shop. Share them sparingly, as you might not always want everyone to access your data.
Not any app can access your shop through the PrestaShop webservice: you decide which can, and what they are allowed to do. Every app has a unique connection key, with specific access rights.
Adding a new key
The "Add new" button takes you to the webservice key creation form:
- Key. A unique key. You can either create your own, or choose to use a generated one, for instance by clicking the "Generate" button or by using any online key generator. Generated keys are most of the time safer, because they are harder to guess.
- Key description. A reminder of who that key is for, and what it gives access to.
- Status. You can disable a key anytime. This enables you to only temporarily grant access to your data from a certain key.
- Permissions. You do not have to share ALL your date with each key. You can choose among a wide array of permissions, either by section or by type of access. You might want some applications to only be able to view a handful of items, while some others (for instance, ones that you would use to manage the shop remotely) should be able to edit and delete just about everything. Choose wisely.
For security reasons, make sure your shop's server supports secure SSL connection!
The configuration is pretty easy:
- Enable PrestaShop Webservice. If you do not want anyone to access your shop through third-party tools and applications, just keep it disabled.
- Active mode CGI for PHP. The CGI mode is a special setting for the Apache server, where you tell it to use PHP as a CGI script rather than an Apache module. While the CGI mode has a reputation of being more secure, it has been found to have a security flaw as recently as May 2012. Ask your web host for advices.
Developers can find our documentation on how to build a tool around PrestaShop's webservice at this address: http://doc.prestashop.com/display/PS15/Using+the+PrestaShop+Web+Service.