Product safety

GaPSeR – product safety information (GPSR)

GaPSeR installation and configuration: manufacturer details, GPSR warnings and labels, bulk assignment, CSV import and a sample implementation.

Description

This module will help your store comply with the EU GPSR directive, which requires informing customers about the product manufacturer and other product safety-related information.

General Operating Principle

The module displays the following information in an additional tab or another selected area of the product page:

  1. The product manufacturer's (brand's) name (if enabled in the module settings)
  2. The product manufacturer's (brand's) logo (if enabled in the module settings)
  3. Text from an additional text field assigned to the product's manufacturer (brand)
  4. Text from an additional text field assigned to the default supplier or all suppliers of the product
  5. Text from an additional text field assigned to the product
  6. Descriptions from all additional, special GPSR categories to which the product is assigned
  7. Images from all additional, special GPSR categories to which the product is assigned

The basic premise underlying the module's operation is that safety information can be displayed for entire groups of products.

Based on this, you can assign and display such information:

  • for all products assigned to a specific manufacturer
  • for all products assigned to a specific supplier
  • for all products assigned to specific, special categories (e.g., flammable products, toxic products, products unsuitable for children)

If the above group options are not sufficient, it is also possible to provide GPSR information individually for each product.

Installation

  • log in to your PrestaShop Back Office
  • go to Modules
  • click "Upload a module"
  • select and upload the file "gmgapser.zip"

Configuration

After the module is installed, a new field called "GPSR Information" will appear on your back office manufacturer (brand) page.

GPSR information field in the manufacturer editor
GPSR information field in the manufacturer editor.

This is a multi-language field, but it does not depend on the store in a multistore setup (similar to manufacturer description fields).

The information you fill in that field will be displayed on the product page, in the 'GPSR Information' tab (or other position according to module's hook attachment).

Below this information, you can additionally display:

  • Text entered in the product's "GPSR Information" field. This field, depending on the PrestaShop version, appears on the product page in the back office either below the description or in an additional tab.
    GPSR information field on a product page
    GPSR information field on a product page.
  • Texts from the descriptions of the product's additional categories (more details below)

Module Configuration Options

  • GPSR Header - set GPSR tab / section header. If unfilled, the module will use "GPSR" phrase.

    Example phrases that can be used:

    • Manufacturer
    • Safety
    • Safety Information
    • Product Safety
    • Warnings and Instructions
  • Display manufacturer (brand) name - if enabled, the manufacturer (brand) name of the product will automatically be displayed at the beginning of the GPSR information block.
  • Display manufacturer (brand) logo - if enabled, the manufacturer's (brand's) logo will automatically be displayed at the beginning of the GPSR information block, provided it has been added.
  • Logo Format - here you can choose whether to use the original image as the manufacturer's logo or one of PrestaShop's thumbnails. The original image ensures the best proportions, but if you select it, make sure that the files uploaded as manufacturer logos are not too large to avoid unnecessarily slowing down the product page.
  • Use category-based warning and labeling system - if enabled, the module will display additional information and labels in the GPSR block, retrieved based on the product's assignment to a special additional GPSR category tree. If you do not use additional descriptions or labels, disable this option to prevent the module from unnecessarily searching for additional information for the product.

Placement of GPSR Information on the product page

If you want to display this information in another place, you can do so in the following way:

  • Go to Design -> Positions
  • Search for the "GaPSeR" module on the list, and unhook it from the "displayProductExtraContent" tab
    Removing the module from its default hook
    Removing the module from its default hook.
  • Click "Transplant a module" button at the top.
  • Choose the "GaPSeR" module from the list and select a hook that you want it to be attached to. For example: "displayFooterProduct". Then click "Save".
    Assigning the module to a selected hook
    Assigning the module to a selected hook.

The choice of a hook may heavily depend on the theme used by your store.

If you want to display this module in a custom place of your theme, you can use it as a widget. In this case, place {widget name='gmgapser'} code in the desired place.

Adding attachments

If you want to add an attachment (e.g., a PDF) in the content of the "GPSR Information" field, use the link function of the PrestaShop editor and the file manager:

Inserting an attachment link in the editor
Inserting an attachment link in the editor.
Selecting an attachment file
Selecting an attachment file.

PrestaShop 1.6 and ThirtyBees

For these software versions, the module is attached automatically to the displayFooterProduct hook, or it can be placed anywhere on product page with a custom hook that you need to add to your product.tpl file: {hook h='displayGapser'}

If you are using the Warehouse template for PrestaShop 1.6 or ThirtyBess and want to display GPSR information in an additional tab, you can do so by hooking the module to two hooks provided by this template: displayProductTab and displayProductTabContent.

Managing Products Without a Manufacturer

The module includes several tools that can assist when not all products are assigned to the correct manufacturers.

Information Panel

Displays a counter of products without a manufacturer and allows exporting all such products to a CSV file. The completed file can then be imported using the built-in PrestaShop product import tools (Advanced -> Import tab).

Overview of products without a manufacturer
Overview of products without a manufacturer.

Mass Product Assignment to Manufacturer (Brand) Panel

Bulk manufacturer assignment panel
Bulk manufacturer assignment panel.

Allows performing bulk operations to assign products to a selected manufacturer (brand).

Working with the panel involves three steps:

  1. Search for products. Products can be searched by a specific phrase in their name, description or feature values, and the search can be narrowed down to specific categories. Leaving the search phrase or category filters blank will result in no search restrictions, thus finding a significantly larger number of products. The search can also be limited to products that do not have a manufacturer (brand) assigned.
  2. Select products. The found products are displayed in the step-two panel. Here, you can select specific products or all of them (by clicking the checkbox at the top of the list).
  3. Assign a manufacturer (brand). After selecting products, they can be assigned to the chosen manufacturer (brand). The assignment is performed product by product, with progress indicated by a progress bar below.

Assigning products to a manufacturer is performed directly in the database. Therefore, if you are using a filter module in your store, a re-indexing may be required.

Category-Based Warning and Labeling System

If you need to add additional warnings or labels to your products, you can use the method based on additional categories.

The module creates a special, inactive category named GPSR during installation.

GPSR category created by the module
GPSR category created by the module.

To add additional warnings or labels to products:

  • Go to Catalog -> Categories in your store's backend
  • Click "Add new category"
  • Enter a category name that will allow you to easily identify it (the name will not be visible anywhere)
  • Select GPSR as the parent category
    Selecting the GPSR parent category
    Selecting the GPSR parent category.
  • The description you provide for the new category will be displayed in the GPSR information section for all products assigned to this category, for example:
    Example of a category warning description
    Example of a category warning description.
  • If you add an image to the new category, it will be displayed as an additional marking at the bottom of the GPSR information section for all products assigned to this category. The category meta title will be used as the image's alt and title attributes.
    Example product safety marking image
    Example product safety marking image.
  • Save the new category, keep it disabled.
  • Repeat the above steps for each warning or label you need. If you only need a warning, do not add an image to the category. If you only need a label (e.g., a CE mark), add an image without filling in the category description.

After creating the appropriate categories, the next step is to assign them to each relevant product. To do this in bulk, you can use the module's built in panel.

The display order of warnings and labels matches the order of the additional categories. Therefore, if you want a specific warning or label to appear first, move its corresponding category to a higher position.

In the "Free Icons" folder of the module package, you will find sample labels for use (free, sourced from Wikimedia Commons).

If you do not want to use this system, disable it in the module's configuration. This will prevent the module from searching for warnings or labels for products.

Mass Assignment of Warnings and Labels to Products

Bulk warning and marking assignment panel
Bulk warning and marking assignment panel.

Allows you to perform mass operations to assign warning and label categories to products.

The process consists of three steps:

  1. Searching for Products. Products can be searched by a specific phrase in their name, reference, description, or feature values. You can also narrow the search to specific categories or manufacturers. Leaving the phrase or category filter blank will result in no search restrictions, which means finding a significantly larger number of products.
  2. Selecting Products. The found products are displayed in the second step of the panel. Here, you can select specific products or all products (by clicking the checkbox at the top of the list).
  3. Assigning Warnings or Labels. After selecting the products, you can assign them to selected warning or label categories. Assignment is performed product by product, and the progress is shown by a progress bar below.

Assigning categories to products is done directly in the database. Therefore, if you do not see changes on the front end, clearing the cache may be required. However, changes in categories should immediately be visible on product pages in the back office of the store.

Import Descriptions from a File

If you need to add GPSR information to each product or manufacturer (brand), you can use the file import panel for this purpose.

CSV description import panel
CSV description import panel.

The tool supports files in CSV format, searches for products or manufacturers in the store based on the selected identifier, and assigns them a GPSR description for the specified language.

To perform the import for products:

  1. Prepare a CSV file encoded in UTF-8 format, containing at least two columns: product identifier and GPSR description.
  2. Upload the file in the form.
  3. Specify the language for which the import should be performed.
  4. Specify which identifier will be used to search for products in the store (the search also works if the identifiers are assigned to product combinations).
  5. Specify the column containing the product identifier in the CSV file (using the alphabetical numbering commonly used in spreadsheets).
  6. Specify the column containing the GPSR description (using the same numbering).
  7. Specify the delimiter used to separate columns in the CSV file (commonly a comma).
  8. Click the "Upload and Import" button.

To perform the import for manufacturers:

  1. Prepare a CSV file encoded in UTF-8 format, containing at least two columns: manufacturer identifier and GPSR description.
  2. Upload the file in the form.
  3. Specify the language for which the import should be performed.
  4. Specify which identifier will be used to search for manufacturers in the store.
  5. Specify the column containing the manufacturer identifier in the CSV file (using the alphabetical numbering commonly used in spreadsheets).
  6. Specify the column containing the GPSR description (using the same numbering).
  7. Specify the delimiter used to separate columns in the CSV file (commonly a comma).
  8. Click the "Upload and Import" button.

Sample Implementation

One of our clients achieved the following final result:

Sample implementation – Norddeco
Sample implementation – Norddeco.

Let’s see how the individual sections of this tab were constructed.

Header

It comes from the module configuration.

Sample implementation – screenshot 1
Sample implementation – screenshot 1.

Responsible Entity

The text was entered into the additional "GPSR Information" field for the manufacturer, and an image was also added there.

Sample implementation – screenshot 2
Sample implementation – screenshot 2.

Safety Class and Protection Rating

Special categories were created, to which the product was then added. These categories have their descriptions along with images (in this case directly in the category description text). Once the product is added to these categories, their descriptions are automatically displayed in the tab.

Sample implementation – screenshot 3
Sample implementation – screenshot 3.

Instructions and Warnings

In the "GPSR Information" field of the product, text was added along with a link to an attachment, which was uploaded to a separate folder using the PrestaShop file manager.

Sample implementation – screenshot 4
Sample implementation – screenshot 4.

Finally, the layout of individual elements was slightly modified in the `gmgapser-info.tpl` file, and rules were added to the `gmgapser.css` file to align the image with the text vertically and to add an icon next to the link for downloading the instructions.

Troubleshooting

Problem: No changes appear on the front end after saving GPSR information

Solutions: Clear the PrestaShop cache

Need help?

Can’t find your answer? Contact our team.

Contact us