...
- GD library.
- Dom extension.
allow_url_fopen
enabled.
Here is a section of the php.ini
file (the configuration file for PHP):
Code Block |
---|
extension = php_mysql.dll extension = php_gd2.dll allow_url_fopen = On # also recommended register_globals = Off magic_quotes_gpc = Off allow_url_include = Off |
Note |
---|
The GD library (http://www.boutell.com/gd/) enables PrestaShop to rework images that you upload, especially resizing them. The Dom extension enables to parse XML documents. PrestaShop uses it for various functionalities, like the Store Locator. It is also used by some modules, as well as the The |
...
You can download the latest version of PrestaShop at http://www.prestashop.com/en/downloads.
Info |
---|
The downloaded file is an archive, meaning one file containing all of PrestaShop's files in compressed form. In order to continue with the process, you must uncompress the archive. If your operating system does not natively support Zip files, you can download and install a dedicated tool, such as:
|
You can download the development version (unstable) on Github: https://github.com/PrestaShop/PrestaShop/archive/master.zip
Extract the PrestaShop files, and put them in the root folder of the AMP installer you chose:
...
Creating a database for your local shop
To use PrestaShop, you must create a database where your shop will put its data:
Open the phpMyAdmin tool using your browser. Its location depends on the AMP pack you chose:
http://127.0.0.1/phpmyadmin
(XAMPP, WampServer, MAMP),http://127.0.0.1/mysql
(EasyPHP)
Click In the "Databases" tab, put your wanted database name in the field and validate by clicking on the "Create a database" button in the "Databases" tab.
Installing PrestaShop
Open the PrestaShop installer, which should be located at http://127.0.0.1/prestashop
, and follow the instructions.
...
Warning |
---|
Forcing the compilation of Smarty will always slow down the page loading time of the page. Make sure that your production store is set to only recompile the templates if there are updated files, and that its cache is enabled. |
...
PrestaShop's default settings prevent the client to see any server error message or any debugging code.
...
PrestaShop has custom debug methods available for developers: p($variable)
and d($variable)
. They are used to display the content of a variable. It is really a wrapper around the well-known print_r()
method (http://php.net/manual/en/function.print-r.php):
Code Block | ||
---|---|---|
| ||
echo '<xmp style="text-align: left;">'; print_r($variable); echo '</xmp><br />'; return $variable; |
...
p()
is the main method, and d()
works the same way, except that it calls the die()
method instead of returning the variable:
Code Block | ||
---|---|---|
| ||
echo '<xmp style="text-align: left;">'; print_r($variable); echo '</xmp><br />'; die('END'); |
These two methods enable you to check for the state of a given variable at a specific space place within your code.
On top of that, PrestaShop defines the ppp()
and ddd()
method, which are respectively the aliases of p()
and d()
. They work exactly the same, but are often easier to search and find in a huge block of code.
...
There are three main configuration files, all located in the /config
folder:
config.inc.php
defines.inc.php
smarty.inc.php
...
$smarty->debugging
gives access to Smarty debug information when displaying a page. That setting is more easily modified in the "Performance" page of the advanced parameters menu : the "Debug console" option enables you to choose between never displaying Smarty's debug information, always displaying it, or only displaying it when you add ?SMARTY_DEBUG
to the URL of the page you want to test, which can be very useful.
Warning |
---|
When in production mode, On the other hand, when editing a Note that this setting can be made directly from the back-office, in the "Performance" page under the "PreferencesAdvanced parameters" menu. |