Jun 112013
 
Article E-Commerce

Our previous post on the top ten free e-commerce platforms gave an overview of the possible choices to set up an online shop with free open source applications. This post will go through the steps to install an configure an online shop using PrestaShop, one of the most popular free e-commerce platforms. En nuestro anterior artículo hicimos una breve presentación de Las 10 mejores plataformas gratuitas de comercio electrónico.

Prerequisites

The PrestaShop site lists the following requirements:

REQUIRED

  • Supported operating system: Windows, Mac and Linux
  • A prepared package: Wamp (for Windows) or Xampp (for Windowsand Mac) or
  • Web server: Apache 1.3, Apache 2.x, Nginx or Microsoft IIS
  • PHP 5.1+ installed and enabled
  • MySQL 5.0+ installed with a database created

OPTIONAL

  • In the PHP configuration ask your provider to set memory_limit to “64M” and file_max_upload_size to “16M
  • Optional PHP extensions: GD, cURL, SimpleXML, SOAP

For the purpose of illustrating this post, the system where the installation is going to be performed is a linux server that is already provided with an Apache web server, MySQL database and PHP interpreter (this type of server is commonly known as LAMP: Linux-Apache-MySQL-PHP).

Installation

The first step is downloading from www.prestashop.com the installation package for version 1.5.4. When the “Download” button is clicked, a form is displayed that allows to choose the languages we want to include. We choose “English” (default language) and “Spanish”. The file downloaded is named prestashop_1.5.4.1.zip, and is 17 MB in size.

Configuration of a VirtualHost

Under the apache configuration subdirectory “/etc/apache2/sites-enabled”, we create a file “prestashop.cfg” to define the VirtualHost that will be running the PrestaShop installation:

Installation of the prestashop package

Next, we create the /web/shop folder, and extract under it the content of the downloaded package. A file “Install_Prestashop.html” and a folder “prestashop” are created:

Registrer and configure the domain

If we do not already own a domain for our shop, we need to register it now with one of the available registrars (for instance, euroDNS, goDaddy or Nominalia). Almost all registrars allow to register a “.com”, “.net”,etc. generic domain, but not all of them work with domains for a specific country (for instance, “.es”, “.co.uk”). After the domain has been registered, we need to edit the DNS configuration to add a record fo type “A” or “CN” to point the hostname of the shop (for instance, “shop.yourdomain.com”) to the IP address of our server

Create the database

Finally, a database to hold the shop data needs to be created. We can use the phpMyAdmin web frontend to MySQL if it is available on our server. Otherwise, we can create the database directly from the command line:

PrestaShop configuration

Now we are ready to start the configuration of our shop. In the web browser, go to the url “http://shop.YOURDOMAIN.com/install”. In the first page displayed we can choose the language for the installation. We choose “English” and click on “Next”:

prestashop-install-1

 


The next page requests the acceptance of the software license,  and the page following that shows the result of a compatibility check. In our case, the check alerts that:

  • There is an issue with the user permissions

prestashop-install-2


To fix this issue, we set as owner of all the files under the “prestashop” directory the user “www-data” that runs the apache service:

In some cases, the Prestashop installation could complain also that the Mcrypt extension of PHP is not intalled. On a Debian or Ubuntu server, this extension is easily installed using the “apt-get” command:

then, the apache service needs to be restarted:

After the apache web server has been restarted, back in the browser, clicking on “Refresh these settings” shows that the errors have been fixed, and we can click on “Next” to proceed. The next screen contains a form to enter the connection information to access the database we have previously created. Normally, it is enough to enter the name of the database (in our example, “prestashop”) and the password, and leave the default value in the other fields:

prestashop-install-3


The new form that is displayed in the next screen allows us to give a name to our shop, set up the main activity, upload a logo, etc. In the second block, we set up the admin username, email address and password. Clicking on “Next”, the installation script creates the database tables, and loads some demo data in them. Once it finishes, we can finally access the shop’s home page to have a first look:

 

prestashop-install-4

 


The last step is to remove the “install” directory, and change the name of the “admin” directory to be able to access the shop’s management interface:

prestashop-install-5


And this completes the initial setup of our PrestaShop installation! In next posts in this series we will go through the tasks that still need to be performed to have a “real” shop:

– Configuration and maintenance of the product catalog

– Configuration of the payment methods

– Stock management

– etc.

 

 Posted by at 7:22 pm

 Leave a Reply

(required)

(required)