Child pages
  • Understanding the Advanced Parameters

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Table of Contents
maxLevel3

Understanding

...

the Advanced Parameters

Configuration Information

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.

Info

Even with a fresh installation, this section might indicate ".gitattributes", ".gitignore", "CONTRIBUTING.md", "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.

 

Performance

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

Smarty is the name of the template language used by PrestaShop's themes. You can learn more about it at http://www.smarty.net/.

Image Modified

There are three 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 1.5.5.0, 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. Because the debugging console might display private information, make sure only to use it when in maintenance mode, or with the URL parameter.
    • 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_DEBUG at 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.
Note

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.

Optional features

New in 1.5.

Some PrestaShop features can be disabled if you do not use them, as they can slow down your shop.

...

  • 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.

...

  • Smart cache for CSS. CSS files are text-based, and can be safely combined and compressed.
  • Smart cache for JavaScript. JavaScript files are also text-based, but their combination can sometimes prove problematic. Make sure to test everything before leaving that setting enabled.
  • 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.
  • Compress inline JavaScript in HTML. Some themes have JavaScript code directly within. You can either leave it alone, or have them compressed. Again with JavaScript compression, make sure to test everything before leaving that setting enabled.
  • 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.

Media servers

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.

...

  1. 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.
  2. 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: /img, /themes et and /modules.
    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.
  3. 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.

...

  1. Create a subdomain for your store's domain name, for instance http://cdn1.mystore.com (the way to do that depend on your host, ask him about it).
  2. Put a .htaccess file at the root of the subdomain. That file should contain a single line:

    Code Block
    Redirect Permanent / http://cdn-adresse.com


    Replace the http://cdn-adresse.com with the one from your CDN server. This way, you are creating an automatic redirection from your subdomain to your CDN server.

  3. 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

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.

...

Therefore, choose wisely.

Caching

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.

...

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.

E-Mail

E-mail

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.

...

  • SMTP server: smtp.gmail.com
  • User: [email protected] (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.

Multistore

This page is only available when you enabling the multistore feature.

...

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 Import

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.

...

  • 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.
    The form that appears when clicking There is a "Click to view our sample import csv files" link right below the "Upload" button also feature some very useful . 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_import folder 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 seven these types of data:
    • categoriesCategories,
    • productsProducts,
    • combinations Combinations (which was called "versions" in versions of PrestaShop prior to 1.5),
    • customersCustomers,
    • addressesAddresses,
    • manufacturers,
    • suppliersManufacturers,
    • Suppliers,
    • 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.

Data format

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.

...

  • 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): 2013-06-21 15:07:27.

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 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.

Matching configurations

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.

...

  • 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".

DB backup

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.

...

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 /admin folder.

Backup Options

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.

SQL Manager

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.

...

Warning

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:

...

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.

Settings

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

Code Block
SELECT email FROM ps_customer

Listing all the e-mails address of all the customers who are subscribed to your newsletter

Code Block
SELECT email
FROM ps_customer
WHERE newsletter = 1

Listing all the products which are active and have a description in French

Code Block
SELECT p.id_product, pl.name, pl.link_rewrite, pl.description
FROM ps_product p
LEFT JOIN ps_product_lang pl ON (p.id_product = pl.id_product)
WHERE p.active = 1
AND pl.id_lang = 4

Listing all the orders, with details about carrier, currency, payment, total and date

Code Block
SELECT o.`id_order` AS `id`,
	CONCAT(LEFT(c.`firstname`, 1), '. ', c.`lastname`) AS `Customer`,
	ca.`name` AS `Carrier`,
	cu.`name` AS `Currency`,
	o.`payment`, CONCAT(o.`total_paid_real`, ' ', cu.`sign`) AS `Total`,
	o.`date_add` AS `Date`
FROM `ps_orders` o
LEFT JOIN `ps_customer` c ON (o.`id_customer` = c.`id_customer`)
LEFT JOIN `ps_carrier` ca ON (o.id_carrier = ca.id_carrier)
LEFT JOIN `ps_currency` cu ON (o.`id_currency` = cu.`id_currency`)

Logs

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 typeslevels:

  • 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.

Image Removed

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.

Image Added

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, ); "14" if you only want to know about everything, even the tiniest noticekeep the major issues. The default is "5", meaning that no notification is sent.

Webservice

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.

...

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.

Configuration

Warning

For security reasons, make sure your shop's server supports secure SSL connection!

...