Child pages
  • Gestionar módulos y temas

Versions Compared

Key

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

...

Table of Contents
maxLevel3

...

Gestionar módulos

PrestaShop 1.5 comes bundled with over 120 modules that can be installed/uninstalled and configured as desired, in order to customize and complete your shop.

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 did not choose – provided you can find the module that does exactly what you need.

Modules

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

...

Above the table of modules are two buttons, titled "Normal view" and "Favorites view". They radically change the way modules are listed.

Normal view

This is the default view. It enables you to quickly find the module you want to install or edit the settings of.

...

Tip

Some 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. 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 servers is no different for PrestaShop from installing it from files that are already on your server.

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

...

You cannot perform any other action on the available modules using this view: installing, configuring, and others must be done in normal view.

Performing Actions on Modules

All actions are performed in the normal view.

...

Info

Top ranking modules from Addons can be promoted to your module list, depending on your country settings. They appear among regular modules, but their action buttons are not labeled "Install" but instead "Buy - 30 €", for instance. Clicking on the button takes you to the module's Addons page, from which you can log in, buy and download the module. From there on, you can install it on your shop.

Configuring the Native Modules

All the native modules are explained in depth in their own chapter, "Making The Native Modules Work".

Modules and Themes Catalog

PrestaShop comes bundled with a host of modules, but even that number might seem limiting, or you could want to explore other directions.

...

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 does not always mean better.

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

Installing modules

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

There are two ways to install a module: either using the dedicated form, or using your FTP client.

Installing using the dedicated form

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

...

Once configuration is complete, be sure to test the module immediately to confirm that it works as planned.

Installing using a FTP client

To install a new PrestaShop module manually:

...

Once configuration is complete, be sure to test the module immediately to confirm that it works as planned.

Updating a module

Your PrestaShop installation regularly checks with the Addons server if there is any update for your modules. If so, PrestaShop displays a "Update" link for the affected modules. Simply click, and PrestaShop will take care of downloading and updating the module.

Uninstalling a module

Warning

Do not ever delete a module by directly trashing its folder using your FTP client! You must let PrestaShop take charge of it.

...

Tip

Make sure that the disabling or removal of the module does not break the theme.

Installing a theme

Once you have downloaded a theme from the Addons online store, it's up to you have it installed on your PrestaShop site.

Installing using the Theme Installator module

This is the recommended method, as it preserves all the blocks' positions on their respective hooks.

...

Find this module in the module list (in the "Modules" page), and open its configuration screen. This screen presents you with 3 methods to install a new module: from your computer, from a public website, or from your own FTP server. It also gives you a method to export your module in a correct format.

Importing a theme

Whatever the method, the process remains the same: indicate the location of the theme's Zip archive, then click "Next".

...

Click "Next" one last time. A final confirmation page presents you with all the changes applied to your PrestaShop site. Click "Finish" to end the process.

Exporting a theme

This section is only available when there is at least one theme installed on your PrestaShop site.
Exporting a theme is very useful when you want either to back the theme up for safety, and create an archive of the theme for a friend or in order to make it available on the Addons marketplace (http://addons.prestashop.com/). Not only does it generate a complete Zip archive of your theme, but it also adds many information in an XML files, which is very useful both when uploading to Addons, and when importing to another PrestaShop site.

...

Once all the parameters are correctly set, click on "Generate the archive now". You will quickly get a file to download from your browser. Save it on your hard-drive, then give the save file a proper name. From there on, you can easily share this theme, and if it is your own creation, you can start selling it on PrestaShop's Addons website at http://addons.prestashop.com/.

Installing using a FTP client

This method is not recommended, but is still available. Use with caution: your blocks might not have the expected position on their respective hooks.

...

Once configuration is complete, be sure to test the theme immediately, every page of it, to confirm that it works as planned. Do try to make a full order, from A to Z – you wouldn't want to miss orders just because you didn't notice the theme was incomplete!

PrestaShop's mobile template

The mobile template enables any PrestaShop merchant to have his or her shop be accessible to mobile devices: from the home page to the payment process, along with product pages and conversion funnel.

Installing the mobile template for your shop

Installing PrestaShop's mobile template is easy:

...

By default, the mobile template is only used for mobiles phones, tablet receiving the same theme as regular devices. With this option, you can choose to have the mobile template be used for tablets ("Both" option"), or even choose to only have it used for tablets (mobile phones receiving the regular theme).

Customizing the mobile template

The mobile template's files are located in the /mobile subfolder of the current theme's folder. This way, if you current theme is the default PrestaShop theme, the mobile template's files are in the /themes/default/mobile of your PrestaShop 1.5 installation.

...

Therefore, if you wish to change the colors or layout of the mobile template's pages, you must edit the CSS and/or HTML files in order to adapt them to your likings. You must have a good knowledge of web programming languages, or ask for help from a web developer.

Using the mobile template with another theme

The mobile template is only available if the current theme has a /mobile subfolder in its own folder. Hence, numerous PrestaShop themes do not have a proper mobile theme, and these themes' users cannot automatically offer a mobile version of their shop to their visitors

...

You will therefore use the default mobile template rather than a template with a design that is consistent with your main theme, but nothing is stopping you from editing the HTML, CSS or JavaScript files of the mobile template in order to get it closer to your own theme.

Positions

A modules can have to aspects: one on the back-office (its options, or even a configuration screen), and one on the front-office. The front-office view is how and where the module is displayed within your shop's theme.

...

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 changing a module's position within a hook:

...

For most modules, transplantation can easily be done directly via the back-office. Some modules require 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. You can add a module to more than one hook.

...

The "Hook into" drop-down menu gives you a good idea where module can be placed.
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 module.

...

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, found at the top and the bottom 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 visually decide where to place your modules. You can access it from the "Position" page, by clicking the "Run LiveEdit" button.

...

Warning

Once you have 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" form.

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.

...

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 using several different payment methods, such as checks, bank wire, cash on delivery, and through several partner modules such as PayPal, Moneybookers, Hipay, etc.

...

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

...

Find the "Cash on delivery (COD)" module in the list (sorted alphabetically). To install it, you just need to click on the "Install" button. 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

Depending upon the payment, the customer's choice of currency 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.

...

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 currency once and for all before adding any product.

Payment Module Restrictions on Groups

You can limit the choice of available payment 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.

...

For instance, 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 customers and on your choices, customers will only pay using the methods that match with your decisions.

Payment Module Restrictions on Countries

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

...