PrestaShop 1.3 Beginner's Guide

By John Horton
    What do you get with a Packt Subscription?

  • Instant access to this title and 7,500+ eBooks & Videos
  • Constantly updated with 100+ new titles each month
  • Breadth and depth in over 1,000+ technologies
  1. Building Your PrestaShop

About this book

PrestaShop is a hidden gem. There are many much more widely known online shopping cart solutions that have nothing like the features, potential, and ease of use that this open source, completely free-to-use, system has. But until now there has been no information available on how to make the most of it. This book takes a step-by-step approach to help you set up your own e-commerce store and maximize its potential. Even if you are totally new to e-commerce and PrestaShop, you can have your own functioning e-commerce store quickly and with tiny expenditure. Imagine the feeling when you get that glorious e-mail saying that you have your first paying customer.

This practical guide follows the order of developing an active business. Packed with easy-to-follow steps with loads of screenshots and clear explanations, it follows a step-by-step approach to set up a PrestaShop e-commerce store from the very beginning through finding a web host, setting up your PrestaShop store, accepting money from customers, and planning for the future of your business.

The first few chapters are a lightening, but thorough, illustration of how to get your shop online, stocked up, and looking smart and unique, including some really cool and really simple product features to show off your wares in style – very quickly. The later chapters are quite diverse and cover some exciting stuff such as newsletters, loyalty schemes, alternative revenue streams, statistics and analytics. You will also learn about security, disaster recovery, payment handling, currencies, taxes, shipping, and more. Towards the end, the chapters cover final preparations before going live, handling orders in PrestaShop, and how to promote your store and get more customers. Once the money starts to flow, the book looks at the future of e-commerce and your PrestaShop business. Then it discusses how to get to the top of your niche and stay there. And then the big secret: to use the knowledge you have gained to turn a single PrestaShop into a thriving e-commerce empire.

The Appendix covers a number of worthwhile topics such as a handy PrestaShop control panel reference and various web resources for PrestaShop.

Publication date:
June 2010
Publisher
Packt
Pages
308
ISBN
9781849511148

 

Chapter 1. Building Your PrestaShop

I don't believe in hanging around! So let's get right on with setting up PrestaShop. Take a look at what we will do next.

In this chapter we will:

  • Download and prepare the PrestaShop files

  • Make a database

  • Install PrestaShop

  • Implement post-install security

  • Have a look at your shop from a customer's viewpoint

  • Have a look around your new admin control panel

Here we go...

Case studies

To make this book realistic, I will refer to two fictitious stores—fluffyteddies.com and guns4u.com. The diverse and extreme nature of the case studies will help to clearly demonstrate the "real" application of some PrestaShop features. I will refer to the case studies from time to time to discuss how the topic in question might fit in with one or perhaps both of them. Here is a bit more about the case studies.

  • Fluffyteddies.com

    Fluffy Teddies is a brand new small scale business. It is the fulfillment of a dream for a teddy bear, doll, and accessories hobbyist. It is his plan to offer a wide and diverse range of the most delightful and collectable products of their type, available in one place.

    He is passionate about his range and aims to project this to his customers through an interesting and useful website content as well as good quality merchandise.

  • Guns4u.com

    Guns4u is the web outlet for a major arms reseller. Guns4u has a very wide range of weapons from small arms to intercontinental ordinance with various warheads as well as state-of-the-art missile defense systems.

    Guns4u plans to make their product range available to a wide and diverse range of customers. Operating from the independent island of Tropicano in the South Pacific, it is not governed by restrictive laws on arms sales.

    Just as long as Guns4u complies with the stringent tax laws of the ruling dictator of Tropicano, it will have a free reign to sell its wares to whoever it chooses. Guns4u intends to offer a retail range to anybody and a bulk discounted range for its bigger customers.

 

Case studies


To make this book realistic, I will refer to two fictitious stores—fluffyteddies.com and guns4u.com. The diverse and extreme nature of the case studies will help to clearly demonstrate the "real" application of some PrestaShop features. I will refer to the case studies from time to time to discuss how the topic in question might fit in with one or perhaps both of them. Here is a bit more about the case studies.

  • Fluffyteddies.com

    Fluffy Teddies is a brand new small scale business. It is the fulfillment of a dream for a teddy bear, doll, and accessories hobbyist. It is his plan to offer a wide and diverse range of the most delightful and collectable products of their type, available in one place.

    He is passionate about his range and aims to project this to his customers through an interesting and useful website content as well as good quality merchandise.

  • Guns4u.com

    Guns4u is the web outlet for a major arms reseller. Guns4u has a very wide range of weapons from small arms to intercontinental ordinance with various warheads as well as state-of-the-art missile defense systems.

    Guns4u plans to make their product range available to a wide and diverse range of customers. Operating from the independent island of Tropicano in the South Pacific, it is not governed by restrictive laws on arms sales.

    Just as long as Guns4u complies with the stringent tax laws of the ruling dictator of Tropicano, it will have a free reign to sell its wares to whoever it chooses. Guns4u intends to offer a retail range to anybody and a bulk discounted range for its bigger customers.

 

Downloading PrestaShop


Visit www.prestashop.com to get your free copy of PrestaShop. Click on the Download PrestaShop option. Fill in the very brief registration information and click on the big blue button. Finally click on the Download button and you should have a zipped file called prestashop_1.x.x.x.zip, where x.x.x is the version of PrestaShop you have downloaded. The version number you have doesn't matter. As long as you follow the download link from the PrestaShop home page, you will have the latest stable version.

In the next tutorial, we will upload all the loose unzipped files to your web server. It is worth pointing out that you might save some time by uploading the zipped file and then using your web host's file manager to do the unzipping. As most web hosts use a slightly different system, I will guide you through by unzipping first. But if you know how to use your web hosts file manager to do this, then you could save a short wait while uploading. You decide. Unzip it now to prepare for the next guide and you will be left with a folder called prestashop.

Now that you have downloaded and unzipped the PrestaShop files, it's time to put them onto your website ready to install. If you are hosting at home, this is a simple matter of putting them in the Apache home folder (see my downloadable guide if you're unsure where this is).

If you are developing on a live server, then you need to transfer the files via FTP. Let's do that step by step.

 

Time for action - transferring files to your web host


To make this as quick and easy as it can be, I will use a few Windows shortcuts in this short click-by-click guide. Just before you dive in, you will need your FTP username and password. If you don't know it already, you can usually find this quite easily by looking in your account details in your web host's control panel. Any doubts, give them a ring. That's what you pay them for.

  1. 1. Hold down the Windows key and tap the E key twice. You will have two Explorer windows pop up. Arrange them neatly one above the other. Alternatively, you can grab a copy of a dedicated FTP program such as FileZilla from www.sourceforge.net. There is a small learning curve doing this, but once you're used to it, you will have more options when using FTP. This guide assumes you do not have FileZilla, but if you do, it won't be a problem to interpret the guide.

  2. 2. Browse to the unzipped prestashop folder at the bottom of the window. Actually click into it. We do not need the folder itself, just the contents.

  3. 3. At the top window, you need to log into your website via FTP. In the address bar at the top of the screen, type ftp://yourdomain.xxx and press Enter. When a pop-up window appears, enter your FTP username and password that you obtained earlier.

  4. 4. Now at the bottom of the window, left-click on the very first file. Hold down the Shift key and then using the down arrow key, while still holding down Shift, scroll to the very bottom of the screen so that all the files and folders are highlighted. Every single one.

  5. 5. Now let go of all the keys on the keyboard. Left-click and hold the left mouse button. You can now drag all the files from the prestashop folder on your PC up to your website in the top window.

  6. 6. Wait for the files to upload. The time will vary according to the speed of your Internet connection.

What just happened?

What you have done is put all of the files and folders containing the entire computer code, data, images, and other resources into your web host's server ready for the next phase of installation.

So let's move on.

 

Making a database


PrestaShop needs a MySQL database to function. The files we have just uploaded are the web pages that will become your store and the PHP programming code that performs the actions required by your store.

For example, when a customer creates an account in your new shop, the programming code contained in the files that we uploaded will fill out and store the information in a completely separate computer program. This program is called a database server and the type of database server that PrestaShop uses is called MySQL. Usually, when you are pro-hosting, this server will be an entirely different physical computer to the one holding your files (the web server).

As with many servers/computer programs, you need a username and password to access its functions. You also need a unique name for a database for your shop on that server, and you need to know the address locating the server. As an example, this could be aserver.myhost.com. Or it could be something completely different.

Now many web hosts will have already allocated database server details to your hosting account. If this is the case, then you only need to find them and make a note of them for the next phase of the installation.

Most likely your web hosts have a simple two- or three-click process for creating a database. You can then access the details of this newly created database in order to proceed.

Precise details will vary from host to host and also the order in which the options are presented (if at all). The database creation process goes like this.

If you already have a created database, that is okay. PrestaShop can function on a database used by other applications. However, to make sure that they do not conflict, or worse, damage each other, pay close attention to the How to install PrestaShop section to be sure you create a table prefix!

 

Time for action - creating a database


First of all, you need to log in to your hosting control panel. You are looking for an option called "MySQL", "MySQL databases", or perhaps just "databases".

  1. 1. Click on MySQL databases or something similar.

  2. 2. Now we need to make another database. Look for the option Create new, Make a database, or perhaps just add. Click on it to see the options presented. Below is a screenshot of the database creation page on the Godaddy.com control panel. It serves as a good example because it has more options than most. If your screen has fewer options, that is okay. Just follow the guide for the bits you need to.

  3. 3. Description: This is an arbitrary field. Suppose over the years you open a couple of dozen stores, all requiring a database; eventually just a database name might not be enough to identify its purpose. Put something quite descriptive here, like 1st PrestaShop on www.mydomain.com. Abbreviate it if there is not enough space.

  4. 4. Database username: This is an important detail that needs to be remembered. It is case sensitive, so upper and lower case must be accurately recorded. Choose a username; again, it is arbitrary, but use something appropriate and not easily guessable, like mydomainsomesecretnumber. There will be a maximum number of characters, so you might need to use a shortened version. Write it down or copy and paste it into Windows Notepad or on a similar application. It is possible that you do not have a field for a name or it has already been filled out automatically. That's fine. Just write it down.

  5. 5. Enter a memorable but un-guessable password. Again this might be decided for you and it might not have this option at all. Re-enter the password if required. Write it down or copy and paste it in Notepad or something similar.

  6. 6. Read-Only User Name and Password: This is not required for PrestaShop, so leave it blank.

  7. 7. If you get the choice to select versions for MySQL, tick/check the option for 5 or later.

  8. 8. And, if as shown in the screenshot you get the option to Allow Direct Database Access, this is a definite No. We don't want people to fiddle with our database from far away.

  9. 9. When you're done, click to create the database— OK, Finish, Create, or whatever your web host decides to label their button with.

  10. 10. Now you should be able to see a summary of the database you created. Complete with the values you chose and the values chosen for you. The following screenshot will give you an idea. As usual, write it all down or copy and paste it into Notepad or some similar application.

What just happened?

Now we have a fresh database just itching to be filled up and manipulated. We also have the database information we need to do so. Next we can go to the most interesting part of the process and get our very first glimpse of PrestaShop in action. We'll set up the program right away.

 

How to install PrestaShop


Now for the fun part when you get to see some results. What we are going to do is run the PrestaShop auto-installer. This will be a series of web pages where you will enter information to allow the auto-installer to configure your store.

The sort of information that we will be entering is business information such as your shop name, personal details, and of course the database information gathered previously.

 

Time for action - the PrestaShop auto-installer


To get started, type your shop domain name into your web browser. It will automatically redirect to the default start of the PrestaShop installation program. You should see the following window:

  1. 1. First up, just choose your language and click on Next to move to the SYSTEM AND PERMISSIONS screen:

  2. 2. Check that you have all green ticks, as in the preceding screenshot. If you do, then click on Next to proceed and jump to the next number. If you see some scary red crosses, don't panic because there are some simple solutions. And here they are. If you have all green ticks move on to step number 6.

  3. 3. If you have any red crosses under the PHP settings, then you need to contact your web host and ask them to make some changes for you. If your hosting package has the system requirements discussed earlier, it is most unlikely you have any crosses here. Also, if you have installed hosting on your own PC as described in my free guide, they will all be ticks. If you have crosses and need to contact your web host read the next point first.

  4. 4. Next is Write permissions on files and folders. This is the most likely area to have some crosses and also the easiest to remedy. In order for PrestaShop to install itself, it needs to be able to modify (write to) various files and folders. A red cross indicates that the folder cannot be written to. Changing this is nice and easy. Log in to your website with FTP just as we did when we transferred the PrestaShop folders there. Locate any folders with a red cross, right-click on them, and select Properties. Then put a tick in the top two checkboxes under the Write column. Done! It is possible that you might need to use your web host's file manager to do this step. Also, if you extracted the files on your web server, then the file permissions will probably not need amending at all. The last optional settings are just that, entirely optional. And again if you are pro-hosting, your web host will need to resolve this for you. But PrestaShop will still be functional without them.

  5. 5. Click on the Refresh these settings button to check if you have solved the problem(s) and then press Next and read on.

  6. 6. Next is the DATABASE CONFIGURATION screen:

  7. 7. You have probably guessed that this is where you will fill in all the database information that we collected earlier. I will go through each setting one at a time because some of the fields are described differently from host to host and by PrestaShop. I feel the need for a small table of explanations. Here it is:

    PrestaShop field

    Explanation/alternative name

    Database server name:

    The address of the computer (server) with your database on it: Sometimes called 'address', 'host name', or just 'the database server'.

    Type this in here exactly as it appears in your web hosting control panel.

    Database name:

    Simply a name given to the database on the database server: On shared hosting environments, this is often the same thing as the username (or login as PrestaShop calls it).

    Enter exactly as it appears in your hosting control panel.

    Login:

    Your MySQL username: On shared hosting environments, this is often the same as database name.

    Enter exactly as it appears in your hosting control panel.

    Password:

    Your top secret sequence of letters and numbers (Shhh…).

    PrestaShop database tables prefix:

    This is a short series of letters placed before all the tables (sections) of your soon-to-be-created database. When an e-commerce shop of any type is created, there are dozens of "tables" created to store all the necessary information. If you think about it, all stores are likely to have similar table names (perhaps 'customers' or 'products'). When this occurs, adding a unique prefix prevents the new table destroying the old.

    A prefix is a good idea at any time, a very good idea if you have any other uses for your database and essential if you have more than one PrestaShop on your database.

    If this is your first PrestaShop, I suggest leaving the prefix as it is, that is ps_. But if this is your second or third, I suggest changing it to ps2_ or ps3_.

  8. 8. Select the Simple mode checkbox. This gives us a nice clean slate to work with. The other option sets up your store with sample products and lots more features all ready to go. That's cool. But do we know what we want yet? At the end of the day it is up to you. If you want to do it the Full mode way, that's fine. This book assumes that you have gone for the Simple mode installation, but the coming chapters would be quite easy to interpret if you want to do it the other way. I suggest Simple mode, but you decide.

  9. 9. Leave the Configure SMTP manually box unchecked. This is unnecessary for a pro-hosted environment.

  10. 10. Now enter your preferred e-mail address on your shop's domain that you would like PrestaShop to use. PrestaShop will send e-mails to customers to thank them for orders, notify them of dispatch, and more. PrestaShop will also contact you to let you know about important events such as when people spend money!

  11. 11. Click on Next and your shop database will be made. You will see this screen:

  12. 12. This page is really simple but with a little twist. Just fill in your first and last names along with the password you want to use to log in to your admin control panel. Do not select the Receive notifications by e-mail checkbox, as we will enable this later. There is a small bug in PrestaShop and this step avoids it. The one field that I haven't covered is the Shop logo box. I will cover this later, but if you just happen to have a 230x75 pixel graphic logo on your PC, feel free to browse to it and include it right away. Click on Next and rejoice.

What just happened?

You have just made your first PrestaShop. Cool! A few more bits and pieces to fiddle with and you're done. Was that difficult? In my opinion, if there is a technical side to running a PrestaShop e-commerce business, then that was probably about as geeky and technical as it gets! If you are reading this, you are heading for success.

 

Post-install security


Just a few, very quick modifications to your PrestaShop files and it's done.

Deleting the install folder

What we need to do is delete the entire folder called install from your web server. The reason for this is that it contains the PHP code that configured your store. So it might be very easy for anybody who knows it is there to rerun the install process with erroneous information and mess up your store.

 

Time for action - how to delete the install folder


This is probably the quickest and easiest way to do it:

  1. 1. Hold down the Windows key and hit E once. This will bring up a new Explorer window.

  2. 2. In the address bar, type ftp://yourdomain.com and hit Enter/Return.

  3. 3. Enter your FTP username and password.

  4. 4. Find the install folder. It is nice and prominent, near the top, under the img folder.

  5. 5. Right-click on it and select Delete. That's it. Don't close the FTP window, and read on.

What just happened?

Without the PrestaShop install files nobody can run the install process again. So we just prevented anyone with a little bit of knowledge from reinstalling over our PrestaShop and causing us to have a bad day. Next we will take another precaution to protect our new shop.

Renaming the admin folder

The admin folder holds all the web pages and PHP code that allows you to manage your shop. Almost any customization or configuration that you will make using your control panel, including the ability to log in, relies on this folder and the knowledge of its location. So you obviously don't want any Tom, Dick, and Harry sitting on their PC at www.yourdomain.com/admin trying to guess your password. And anybody who knows anything about e-commerce software knows that the default folder name for such functions is often admin. So we will now name it something more secret and personal.

 

Time for action - renaming the admin folder


You should already have an FTP window to perform these steps. If not repeat Steps 1 to 3 in the previous Time for action section and then come back here.

  1. 1. Find the admin folder.

  2. 2. Right-click on it and select Rename.

  3. 3. Rename it something that is easy to remember but difficult to guess. I suggest treating your admin folder name like a password. Perhaps, admintrickypassword. Make sure to leave the admin bit at the start. Then it should be safe from prying eyes and tampering fingers, but you and the PrestaShop system will know where it is.

  4. 4. Close your FTP window.

What just happened?

You just made your store's Control Panel practically inaccessible to anybody except you.

 

Your shop-front explained


Now, at last, it is time to see your shop! Visit www.yourdomain.com. It should look like the following screenshot:

I have made a couple of notes to indicate a few areas that we will discuss next. It helps to name areas so that we can refer to them precisely and easily, instead of talking vaguely about the different parts of your site. PrestaShop refers to even more positions than this, but they are all related to these main ones.

If you haven't already, go and have a look at a PrestaShop that has some content. This will help you visualize approximately how your own store will take shape. You can do this at http://www.prestashop.com/en/showcase_demo/.

Header

This includes the little PrestaShop graphic in the top left. We will soon replace it with yours. As we progress, we will optionally add features and functions to this part of the store.

Column (left & right)

These areas are for navigation and just about anything outside of the main content area. Exactly how and where you position things will be up to your business objectives and your personal preferences. We will discuss all the options along the way.

Main content

The big bit in the middle! This is where your customer can find the most significant information. The home page, the product description, the product category, an article you have written, among others.

Footer

This is the full width of the website, right across the bottom.

 

Your admin control panel


Now log in to your store control panel. This is where 90 percent of this book will take place. This is what you will see:

 

Time for action - logging in to your PrestaShop control panel


Here is how to get there.

  1. 1. In your web browser type www.yourdomain.com/youradminfoldername, where youradminfoldername is the same name that you chose for your admin folder previously.

  2. 2. Enter the e-mail address you registered with and the password you gave on the last configuration page when you installed PrestaShop.

  3. 3. Hit enter and you're in.

  4. 4. Why don't you have a look at the PrestaShop live feed? This contains topical news and information about PrestaShop direct from the creators. If there is an update available for PrestaShop, you will hear about it here.

What just happened?

You took your first look inside your store control panel. Now let's click some buttons.

Control panel guided tour

Here I will quickly run through some of the general functions contained within each tab and drop-down box and mention when, approximately, we will cover them in more detail. Why not explore as we run through them? A full control panel reference is contained in Appendix 1. From left to right, we have:

  • Catalog: On this tab we have everything we need to manage our product range and all related aspects. For example, as well as creating the products Chapter 3 themselves, we can give our customers manufacturer and supplier information to aid their buying decision Chapter 2. We can assign advanced features to our catalog such as attributes, features, customizations, and attachments Chapter 3. We can also assign product tags to help customers and search engines easily find what they want Chapter 4.

  • Customers: The Customers tab allows us to view and edit our list of customers as well as creating groups of different types of customers. This as we see can be very useful Chapter 8.

  • Orders: Here we can manage every aspect of post-purchase communication. Things like notifying customers of dispatch or a problem and making invoices available and printing packing slips. All of this will be covered Chapter 8.

  • Payment: This tab lets us connect to payment providers like Google and PayPal as well as offering options such as cash on delivery and bank transfer Chapter 7. We can also add and configure the currencies we allow for payment, and create and manage gift vouchers that can be purchased Chapter 7 or given away as a promotion Chapter 8.

  • Shipping: Unfortunately, this tab can't actually deliver stuff for you. It does just about everything else that is related to delivering your customers' orders. You can configure shipping types, costs, and durations in just about any combination to suit your business Chapter 7.

  • Stats: This topic is crucial. And it is a very significant area where PrestaShop stands head and shoulders above its competitors. Capturing and using statistics Chapter 5 will allow you to measure success and decide how to change and improve your shop Chapter 9.

  • Modules: Just about everything in PrestaShop is a module. If you put a shopping basket here, it's a module; if you put a menu there, it's a module. We will be in and out of the module tab all the time. We will also go into greater depth about modules Chapter 2 and Chapter 5.

  • Employees: If you have someone else helping to run your business, the employees tab will help you manage your staff and how they interact with PrestaShop Chapter 6.

  • Preferences: The second-most varied tab in the whole of PrestaShop. There are many things you can do here. We will be popping in here from time to time and then covering everything we missed Chapter 5.

  • Tools: The most varied tab in the whole of PrestaShop. There are several things you can do here. We will be popping in here from time to time and then covering everything we missed as well Chapter 5.

  • Search box and drop-down: Select a PrestaShop aspect, type a related word, and hit Search. When you can't quite remember which tab is hiding the function you need, the Search box and drop-down menu in the top left is a life saver.

  • Quick access drop-down: Know exactly where you want to go but don't want to click multiple buttons to get there? Select your destination from the quick access drop-down. This handy feature is in your control panel at the top-right corner.

Have a go hero - hunt the PrestaShop thimble

Here is a little challenge for you. Nothing very technical but a sort of PrestaShop 'hunt the thimble'. What if you wanted to temporarily disable your shop? Maybe you wanted to close it for maintenance. Perhaps you want to close it down during development when you're not actually viewing it. Can you find where to do it?

I promise you the solution is simple but can you work out where it is hiding?

Solution: Click on the Preferences tab. Scroll down to Enable Shop and select No. The Maintenance IP box even enables you to enter your unique Internet (IP) address so that only you can see the shop. This is a perfect, secure manner to develop your store. To get your IP address visit http://www.whatsmyip.org/. Enter it in the box on your preferences tab and press Save.

 

Before we continue


It is not important to know where everything is and how it works at this stage. As I mentioned before, we will approach each topic in the likely order of setting up a new business and not in a left-to-right manner. I just thought it might be nice to have a look under the hood before we get stuck in! This will hopefully help you to master PrestaShop more logically and to achieve my 7-day challenge.

Pop quiz - a few questions about Chapter 1

  1. 1. Many web hosts charge per database or have a limit before forcing you to upgrade your package. How would you create almost unlimited PrestaShop installs on the same domain name and same database without overwriting the original?

  2. 2. Once configured, which tab is the most likely you would use to see how many visitors your website has had?

  3. 3. Could you think of what would be the fastest way (least clicks) to begin the process of creating a new product?

 

Summary


We learned a lot in this chapter about PrestaShop.

Specifically, we covered the following:

  • Obtaining PrestaShop: Where to download it from and how to prepare the files, including how to transfer them via FTP to your website.

  • MySQL databases: How PrestaShop uses the database, how to create a MySQL database, and how the different terms are used to refer to the database location.

  • PrestaShop installer: How to complete each step of the installer and filling out the slightly trickier pages like the database configuration page, and how to get round an intermittent bug in the installer.

  • The shop front: How to refer to different parts of the shop front.

  • The admin control panel: A brief look at where the different functions and tasks can be performed.

We're now ready to fit out your shop with a visually pleasing, unique, and sales-efficient design. This is the topic of the next chapter. So let's get stuck in then!

About the Author

PrestaShop 1.3 Beginner's Guide
Unlock this book and the full library FREE for 7 days
Start now