Child pages
  • Managing Modules and Themes

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The range of actions is virtually unlimited: the extensibility of PrestaShop makes it possible to turn your shop into exactly what you intend it to do, instead of you having to comply with constraints that you didn't did not choose – provided you can find the module that does exactly what you need.

...

The "Modules" page under the "Modules" tab gives you access to the list of modules. On this page you can install, uninstall, and configure each module.

Image Removed

Above and below the page title, you will at times get notifications from installed modules. Most of the time, the notification help you complete the configuration of modules that are installed but not yet ready to be used: updating their setting should make the notification disappear... and your module work properly.

...

On the left is a list of all the categories, with the number of modules in brackets. Click on a module category in order to filter the displayed module.
One of the categories is named "Favorites" and is empty by default. This serves as a quick way to access the modules you most often need to access to. You can set your favorite modules using the "Favorites" view.

Image Removed

Modules can have one of 4 statuses, each with specific color:

...

Most of the time, warnings are a reminder that you haven't have not properly configured the module. Click their "Configure" link and go through the various needed steps.

Info
titleDifference between disabling and uninstalling

When you do not have a use for a module anymore, you can either disable or uninstall it. The result of both actions is the same: the module is not available anymore, its options do not appear in your back-office and any element it would add to your front-end disappears.

The difference is that disabling a module keeps its configuration safe for a later re-enabling, while uninstalling removes all configuration and database data.

Therefore, only uninstall a module if you do not care about its data or if you are certain that you would not need it. If you are really sure you do not want that module on your shop, you can even click on its "Delete" link.

Tip

Some modules have "(Addons)" at the end of their name – mostly the payment modules. This means the modules will not be installed from files on your server, but downloaded from the Addons website. It helps ensure that you always have the latest version of a module.

Still, installing a module from files that are downloaded from the Addons server is no different for PrestaShop from installing it from files that are already on your server.

Favorite view

This view gives a whole different presentation of your modules: gone is the list of category selectors, the install/uninstall buttons and the action links. This view gives an alphabetical list of all your modules, both installed or not, their categories in plain text and two drop-down menus:

  • Interest. If set to "No", the module will not appear in your module list at all. If set to "Yes" or "--", it will.
  • Favorite. If set to "Yes", the module will appear in the "Favorites" category. If set to "No" or "--", it won'twill not.

Since these can be two contradictory settings, mixing them can result in unexpected results. They remain quiet logical: in short, "Interest" surpasses "Favorites".

...

There are many more modules available on the PrestaShop Addons website (http://addons.prestashop.com/). Some are free, others are for-pay, and you 're are sure to find something that suits your needs! Once you are a seasoned module developer/theme designer, you can even submit your own creations, and sell them on Addons!

...

  • A search field, with which you can search the whole content of the Addons website.
  • On the right, a "Discover our modules" box, which features 4 modules among the most downloaded.

Image Removed

A search query will return the 5 first results from Addons, with more available if you click on the "View all results on addons.prestashop.com" link at top of the results.

Image Removed

Clicking on an item will open its Addons page in a new browser tab.

Info

Addons is the official marketplace for PrestaShop Modules and Themes. This is where shop owners can get all the necessary items to customize their shop, and where authors can share their creations with the community.

Modules and themes can either be free or for-sale: the price is set by the author. Take the time to browse the available modules and themes, because expensive doesn't does not always mean better.

You must be logged-in before you can download or rate anything. Creating an account is free.

...

Once you have downloaded a module from the Addons online shop to your computer, it 's is up to you have it installed on your PrestaShop site.

...

To install a new PrestaShop module automatically, click on the "Add a module from my computer" link at the top of the list of modules. A new section will slide open.

Image Removed

The form in this section enables you to upload the archive file of the module, as downloaded from Addons. You can either upload a zip file, or a tar.gz one (tarball). The form is straightforward: simply browse to the module's file that you downloaded, and click the "Upload this module" button. Do not point to the module's folder or any of its unpacked files!

...

The "Positions" page displays all the available hooks, and their attached modules. Many are empty by default, but some of the most useful ones have a dozen of modules (the Header hook has 27 by default).

Image Removed

At the top of the page, a drop-down menu enables you to only display the hook in which you are interested.
By default, this page only displays the hoobs hooks on which you can position functions. Checking the "Display non-positionable hooks" box below displays all the hooks, even those where you cannot position something.

...

The modules are displayed in the order in which they appear in the hook.

Moving a module within a hook

You have two ways of moving changing a module's position within a hook:

  • Click the up or down arrow. The page will reload and display the new order.
  • Drag and drop the module's row itself:
    1. Place the mouse cursor between the moving arrows and the module's name to have it change into a "move item" cursor.
    2. Click and hold while moving the cursor over the row/position where you want the module to be: the module's row changes position accordingly.
    3. Release the mouse button: the current position for the module is saved.

For most modules, transplantation can easily be done directly via the back-office. Certain Some modules require altering the you to alter their code in order to transplant them.

Attaching a module to a hook: Transplanting

In PrestaShop, "transplanting" is the action of attaching a module to a hook.

Removing a module from a hook

Transplanting a module via the back-office

Image RemovedYou can add a module to more than one hook.

Two things to know before transplanting a module:

  • Some modules are written to only be attached to a given set of hooks.
  • Some hooks are written to not accept some specific kinds of modules.

Therefore, be aware that you cannot always transplant any module to any hook.

Info

Make sure to disable the cache when testing the effect of a new hook on the front-end. You can do this in the "Preferences" page, under the "Advanced parameters" tab.

The transplanting process has its own interface:

  1. Go to the "Modules" tab, and its "Positions" sub-tabpage.
  2. Click the "Transplant a module" link.button at the top right. The transplanting interface appears.
  3. In the "Module" drop-down menulist, select the module you want to transplant.
  4. In the "Hook Intointo" drop-down menulist, select where you want to transplant the module to. There are many available hooks. You can change your setting later if needed.
  5. In the "Exceptions" field, type the name of the file(s) of the pages in which you do not want the module to appear.
  6. Click the "Save" button.

...

  1. Since PrestaShop 1.5, instead of typing the file-names, you can simply select a file-name and click the "Add" button: it will add the file-name to the list.
    Likewise, you can remove a file-name from the existing list by selecting that name in the drop-down list and clicking the "Remove" button.
  2. Do not forget to save your changes.

The "Hook into" drop-down menu gives you a good idea where module can be placed.

Transplanting a module by modifying its code

Some modules cannot be transplanted into other page sections because they lack the necessary code. For example, the Quick Search block contains templates for both column display and header display, while the Currencies block only has one template file which only pertains to the header section. Likewise, the default Featured Products block can only be placed in the center content section of the main page. If you want to move it to a column, you'll have to do the customization yourself.

If you want to display simpler modules such as the Currencies block or the Featured block in a position for which it wasn't built, you'll have to edit its template files.

To customize the transplantation of a module on a hook, you must give it the PHP function for the hook. For example, the Currency block has this function exists:

Code Block

function hookTop($params)
  {
  ...
  }

In order for instance to transplant the Currency block into the right column, you need to create:

Code Block

function hookRightColumn($params)
  {
  ...
  }

...and edit its PHP, HTML and CSS code accordingly.

Even though the "Hook into" drop-down list gives a comprehensive overview of the available hooks, it might not always be clear which is the one to which you want to attach your module. Do not hesitate to try another hook if the result of your selection if not what you expect.
Since PrestaShop 1.5, the list gives more detail: both the hook name and a quick description of what it does, for instance "Before carrier list" known as "displayBeforeCarrier". Peruse them all in order to choose your hook correctly.

Editing an attached module

Each module has two icons on the right side of its row: one to edit its settings, the other to delete the icon.

Editing a module's setting uses the same interface as the one created for the transplanting a module. The major difference is that you cannot change the "Module" and "Hook into" settings, as they are disabled, and thus greyed out. You can only edit the exception setting, which works just as described in the "Attaching a module to a hook" method above.
While you cannot edit the "Module" and "Hook into" settings, they can serve as a handy reminder of their current position, should you want to put them back there later on.

If you want to move a module to another hook, you must use the transplanting interface:

  1. Click the "Transplant a module" button at the top right. The transplanting interface appears.
  2. In the "Module" drop-down list, select the module you want to move to another hook.
  3. In the "Hook into" drop-down list, select where you want to transplant the module to.
  4. In the "Exceptions" field, type the name of the file(s) of the pages in which you do not want the module to appear.
  5. Save your changes. The hook list appears.
  6. Go to the hook where you have transplanted the module: it should appear in there. Change its position if necessary.
  7. Go to the hook where the module first was, and click the trashcan icon in order to remove it from that hook. This prevents you from having the same module appear twice.

Always check your front-office to make sure the module is indeed where you intended it to be.

Removing a module from a hook

There are two ways to remove a module from a hook:

  • Removing a single module: click the trashcan icon on the right of the module's row.
  • Removing a batch of modules: select the modules by checking the box on the right of their row, and then click the "Unhook" button at the top of the list of hooks.

Transplanting a module visually: Live Edit

Another way to move modules around on the shop's homepage is the Live Edit mode, which embeds said homepage into a tool that lets you graphically visually decide where to place your modules. You can access it from the "Position" sub-tabpage, by clicking the "Run LiveEdit" button.

Image Removed

Once When clicked, PrestaShop opens the homepage in a new browser windows/tab, with the Live Edit script on top:

  • All module blocks have a dotted red border, enabling you to see which blocks you can move.
  • At their top left side, a block-specific icon appears, along with the block's name, enabling you to always find your way among blocks.
  • At their top right side, they have two icons:
    1. A "move" icon: click on it to start moving the module around.
    2. A "trash" icon: click it to remove the block from the home.

Image Removed

At the bottom top of the Live Edit mode, a row toolbar presents you with two buttons: "Save" and "Close Live Edit" and "Save".

Image Removed

The first one is quite self-explanatory; the second one cancels all changes you might have made to your modules' position during this live-editing session. Note that once

Warning

Once you have

...

save your changes after having removed a module,

...

if you want to bring it back, you will have to go to the "Positions"

...

page and use the "Transplant a module"

...

tool.

Where to move modules

Modules cannot be moved just about anywhere: it depends on both the theme's hooks, and each module's hook support (as seen in the above section). Therefore, you mostly can only move modules within their understood context: column modules can be moved within a column as well as from one column to the other (right to left, for instance), while regular homepage modules (the ones at the center) can only be moved within their specific column.

In order to give you a visual hint about where a given module can be moved, it will display an empty green block if the location is correct, and an empty red block if not.

Transplanting a module by modifying its code

Info

This is for experts only: you must have a good knowledge of PHP and HTML before attempting anything with the code of a module.

Some modules cannot be transplanted into other sections of the front-office simply because they lack the necessary code.

For example, the "Quick Search" block (/blocksearch) contains templates for both column display and header display, whereas the "Currencies" block (/blockcurrencies) only has one template file which only works with the header section. Likewise, the default "Featured Products" block (/homefeatured) can only be placed in the center content section of the main page.

If you want to display simple modules such as the "Currencies" block in a position for which it was not built, you will have to edit its template files.
More complex module, such as the "Featured" block, can also be made to display in other sections of the page, but they might have to be partly rewritten in order to have their design work with that new location.

To customize the transplantation ability of a module, you must give it the correct PHP function for the new target hook. For example, the "Currency" block has this function:

Code Block

function hookTop($params)
  {
  ...
  }

In order to transplant the "Currency" block into the right column, for instance, you need to add the hookRightColumn() function:

Code Block

function hookRightColumn($params)
  {
  ...
  }

Afterwards, you must write the code that displays the content on the front page. At best, that means copy/pasting the content of the hookTop() function; at worst, you need to rework the content of hookTop() function into something that will work for the new location.

Payment

With PrestaShop, you can accept your customer's transactions through using several different payment methods, such as checks, bank wire, cash on delivery, Google Checkout, and some through several partner modules such as HipayPayPal, Moneybookers, and PayPal. They are already included in your store and are ready to be used. However, it is necessary to configure them.

Installing a payment module

Hipay, etc.

When in the "Payment" page, you can see the following sections:

  • Payment modules list. Basically, a shortcut to "Payments & Gateways" section of the module list, in the "Modules" page.
  • Three "restrictions" sections:
    • Currency restrictions. Choose with which currencies your installed payment modules should work.
    • Group restrictions. Choose with which user groups your installed payment modules should work.
    • Country restrictions. Choose with which countries your installed payment modules should work.

Installing a payment module

Installing a payment module is fundamentally no different from installing a regular module: simply click the "Install" button, and you are done.
You should simply pay a lot of attention to the settings, and make sure they do point to your address or bank account. Configuring payment modules often means you must first be known by the payment service provider, meaning having an account on their service.

Let's install the "Cash on delivery (COD)" module. You first need to access the list of payment modules. It is of course accessible via the "Modules" tab, under in the "Payments and Gateways" section, category; but you also have a shortcut from within the "PaymentPayments" tabpage: just click on the appropriate button at the top of the page!

Image Removed

This button will send you directly to the correct module section. Here is the full list of payments modules included in the default PrestaShop install.

Image Removed

"Click to see the list of payment modules" button to be taken you to the specific part of the "Modules" page where only "Payment & Gateways" modules are displayed.

Tip

As you can see, many payment modules have "(Addons)" at the end of their name. This means the modules will not be installed from files on your server, but downloaded from the Addons website. The files for the partner modules are not part of the default PrestaShop archive anymore since version 1.5. It helps ensure that you always have the latest version of a module.

Find the "Cash on delivery (COD)" module in the list (third row). To install it, you just need to click on the "Install" button.

Image Removed

PrestaShop will take care of everything, and notify you of the result. For instance, if a module needs to be configured before it can work, PrestaShop will display a notification box at the top of the page. In the case of the "Cash on delivery" module, there is nothing to configure.

Payment Module Restrictions on Currencies

When in the "Payment" tab, you can see the following section:

Image Removed

As you can see, depending Depending upon the payment, the customer's choice of currency will differ:

...

can differ
You can limit the choice of available payment methods depending on the available currencies: you may want customers to be able to pay with any currency when using PayPal, but those paying Moneybookers should only pay using dollars, for instance.

Tip
tileAdding a new currency

By default, only your shop's default currency is available. If you need more, follow this process:

  • In the "Localization" page under the "Localization" tab, import the localization pack for the country which has the currency in which you are interested. For instance, USA for US Dollars, United Kingdom for UK Pound, etc.
  • In the "Currencies" page under the "Localization" tab, enabled the currencies you just imported.

If you need to restrict payment module usage according to the user's currency, simply check the boxes that apply and click on the "Save restrictions".

Note that currency restrictions work in different ways depending on the payment module. For instance, with the native payment modules:

  • Authorize.net, Cash on delivery, CashTicket, PaysafeCard: You cannot change their default setting.
  • Bank wire, Buyster, check, DIBS, Moneybookers, Ogone: You can change any of their currency settings, except for the "Customer currency" and "Shop default currency", which stay at their default state.
  • Google Checkout, Hipay, and Paypal: You can change any of their currency settings, but you can choose only one accepted currency (among those installed in your store), and allow each customer to pay with the currency that they will have chosen in the store.

...

  • option between "Customer currency" and "Shop default currency", not both.

The customer can set his or her currency using the drop-down menu at the top of each front-office page.

You can set the shop's default currency in the "Localization" page, under the "Localization" menu.

Warning

If you change the default currency after having configured some first products, you will have to reset the price of all these products. You should set the default price once and for all before adding any product.

Payment Module Restrictions on Groups

You can limit the choice of available payment method methods depending on the group of customers: you can have a set number of customer groups where people can have access to more payment methods then regular customers.

Image Removed

For instance, let's say you would prefer that individuals you could choose to have regular customers pay with PayPal, Moneybookers and Hipay, while professionals would only be able to pay by bank wire. Depending on the type of customer customers and on your choices, customers will only pay using the methods that match with your decisions.

...

You can limit the choice of payment methods according to your customer's country of origin. For instance, in you could choose to accept all payment methods for customers from France, Spain , and Germany, you can accept all payment methods, while customers in from Italy, the United Kingdom or and Switzerland can would only be able to pay by bank wire.

The choice of payment modules according to country is found under the "Payment" tab, in the "Countries restrictions" section.

Image Removed

Find the country table lists all the known countries. If one is missing, you can add it using the "Countries" page, under the "Localization" menu.

Here again, just as with currency limitations, the available option vary depending on the payment module:

  • Buyster: the only option is you own country.
  • Hipay: the only options are the set of countries supported by the service: Austria, Belgium, France, etc.
  • All the others work with all countries.

Find the country you are looking for in the alphabetical list, and check the boxes to select or deselect unselect the payment methods you want to make available to customers from that country. Once all of your settings have been configured, click on the "Save restrictions" button, found at the bottom of the table.
By default, all installed payment methods are enabled for the shop's country.