dfreparability — Repairability and durability index for PrestaShop
Complete guide to the repairability and durability index module for PrestaShop 8 and 9: installation, per-product scoring, official Bercy computation, frontend display and customization.
The dfreparability module covers the French repairability index (AGEC law, 29 December 2020 decree) and the durability index (22 April 2022 decree) for the 11 mandated product categories, on PrestaShop 8 and 9.
Legal framework
Two texts structure the requirement:
- Repairability index — mandatory since 1 January 2021 for 9 initial categories, gradually extended (AGEC law of February 2020, decree of 29 December 2020).
- Durability index — introduced by the decree of 22 April 2022. Replaces the repairability index for televisions since April 2024 and for front-load washing machines since April 2025.
Both indices are computed on a 0–10 scale from the 5 Bercy criteria (each scored on 20 sub-points). The durability index adds 3 supplementary criteria (reliability, upgradability, maintenance).
Penalty — non-display exposes a legal entity to up to €15,000 fine per non-compliant product (Article L541-9-2 of the French Environment Code).
Installation
- In the PrestaShop back-office, go to Modules → Module Manager, click Upload a module and drop the
dfreparability.zipfile. - Click Install. The module:
- creates the
ps_dfreparability_producttable to store per-product scores; - creates a CMS page Repairability and durability index with a ready-to-customize reference content;
- registers the 11 preconfigured categories with the matching Bercy criteria.
- creates the
- At install time, the module does not modify any existing product. You enter the scores product by product.
Entering the index on a product page
dfreparability adds a Repairability / durability index panel to the product page, available in both legacy and Symfony mode (PrestaShop 9). The procedure is the same in both modes.
The 4 steps
- Index type — choose Repairability or Durability. For televisions and front-load washing machines, choose Durability directly (new requirement).
- Category — pick from the 11 preconfigured categories. The criteria grid adapts automatically.
- Per-criterion scores — each scored on 20. The 5 Bercy criteria are always shown. If Durability is selected, the 3 supplementary criteria appear as well.
- Final score — computed automatically from the criteria. A Manual score field lets you override the value if you’re applying a specific Bercy adjustment documented in the manufacturer’s official grid.
Optional field — Grid PDF: fill in the URL to the manufacturer’s official detailed grid PDF. It’s shown on the product’s detailed score page.
Score computation (0–10)
The module applies the official Bercy method:
score_out_of_10 = (sum of scores / number of criteria) / 2
Example for a smartphone on the repairability index with these 5 scores:
- Documentation: 16 / 20
- Disassemblability: 14 / 20
- Parts availability: 12 / 20
- Parts price: 10 / 20
- Product-specific: 18 / 20
Score: (16 + 14 + 12 + 10 + 18) / 5 / 2 = 14 / 2 = 7.0 out of 10 — light green band.
The 5 regulatory bands
The logo color is derived from the score and strictly follows the official thresholds:
| Score | Band | Color code |
|---|---|---|
| ≥ 8.0 | Dark green | #2d8c3c |
| 7.0 to 7.9 | Light green | #79c142 |
| 5.0 to 6.9 | Yellow | #f5d70a |
| 3.0 to 4.9 | Orange | #f08017 |
| < 3.0 | Red | #cf2127 |
The 11 preconfigured categories
- Smartphones
- Laptops
- Televisions (durability since April 2024)
- Front-load washing machines (durability since April 2025)
- Top-load washing machines
- Dishwashers
- Corded vacuum cleaners
- Cordless vacuum cleaners
- Robot vacuum cleaners
- High-pressure cleaners
- Electric lawnmowers
For each category, the module ships the criteria grid matching the official texts. If Bercy publishes an update to the criteria, a module update is shipped as part of your license.
Frontend display
Position choice
From the module configuration (Modules → dfreparability → Configure), three positions are offered on the product page:
- Under the price (recommended) — uses the
displayProductPriceBlockhook withtype=after_price. Visible immediately on the product page. - In an additional-info tab — uses
displayProductAdditionalInfo. Places the index under a dedicated tab. - Under the thumbnails — uses
displayAfterProductThumbs. Recommended if your theme puts the product info to the right of the thumbnails.
Only one position should be active at a time to avoid duplicates. The module enforces this on the configuration side.
Compact display in listings
A separate option enables a compact badge on product listings (category, search, results pages) via the displayProductListReviews hook. The badge shows the colored logo and the score without the per-criterion breakdown.
Detailed score page
Every product with a defined index has a public page at /module/dfreparability/detail?id_product={id} displaying:
- the large-format colored logo;
- the score with the corresponding color band;
- the full criteria grid with per-criterion scores;
- the link to the official PDF if provided;
- a link to the legal information CMS page.
Legal information CMS page
At install time, the module creates a CMS page Repairability and durability index with reference content in French covering:
- legal grounds (AGEC law, 2020 decree, 2022 decree);
- the 5 color bands table with their thresholds;
- the 11 mandated categories and their effective dates;
- the 5 Bercy criteria and their weighting;
- the supplementary criteria for the durability index.
You’re free to edit this page from Design → Pages and to translate it in any of your active languages. Links from the product pages automatically point to the version matching the visitor’s browsing language.
Customization
Replacing the logos with the official Bercy assets
The module ships 10 SVG logos (2 indices × 5 bands) inspired by the official visual. If the manufacturer provided the official PNG or SVG files, replace them in views/img/logos/, keeping the same filenames:
reparability-dark-green.svg
reparability-light-green.svg
reparability-yellow.svg
reparability-orange.svg
reparability-red.svg
durability-dark-green.svg
durability-light-green.svg
durability-yellow.svg
durability-orange.svg
durability-red.svg
Adjusting the CSS
The frontend uses the CSS classes .dfrep-badge, .dfrep-score, .dfrep-band-*. The main stylesheet is at views/css/dfreparability.css. To override without modifying the module, add your rules in your child theme’s CSS — the selectors remain stable across versions.
Multi-language and multi-store
Included translations: French, English, Spanish, German. Additional languages can be added through PrestaShop’s standard translation tool (International → Translations).
Product scores are stored by id_product, so they’re shared between stores in a multi-store network. If a product needs different scores per store, declinate the product. The legal information CMS page can be differentiated per store through PrestaShop’s standard tool.
Product duplication
The module listens on the actionProductAdd hook: when you duplicate a product with an index defined, the scores and the criteria grid are automatically copied to the new product.
Compatibility and prerequisites
- PrestaShop: 8.0 to 9.x (both product page modes, legacy and Symfony).
- PHP: 7.4 minimum, 8.1+ recommended.
- Themes: compatible with Classic, Hummingbird and third-party themes that fire the standard product page hooks.
- PrestaShop 1.7: not supported.
Troubleshooting
The badge appears twice on the product page
Check that you haven’t enabled multiple display positions simultaneously in the module configuration. Since v1.0.1, the displayProductPriceBlock hook only responds to the after_price type, which prevents internal duplication of the price block.
The detail page returns “Controller not found”
On PrestaShop 9, clear the Symfony cache (Advanced parameters → Performance → Clear cache) after installation. Version 1.0.1 fixes the front controller class name casing to match the canonical form expected by the PS 9 Dispatcher.
The panel doesn’t show up on the Symfony product page
Check that the actionProductFormBuilderModifier hook is properly attached to the module (Design → Positions). It’s the native Symfony hook — if another module has disabled it globally, re-enable it on dfreparability.
Version history
1.0.1 — 14 May 2026
- Fixed the double badge display in the price block (
displayProductPriceBlockrestricted toafter_price). - Fixed the front controller class name to the canonical form expected by PrestaShop 9.
- Defensive loading of
dfreparability.phpandclasses/DfReparabilityProduct.phpat the top of the front controller. - Switched the Smarty variable from
$linkto$module_dirin the admin template (PS 9 ExtraModulesType context does not inject$link).
1.0.0 — 14 May 2026
- First public release.
- Repairability and durability indices per product.
- 11 preconfigured categories, 5 regulatory bands, 10 SVG logos.
- Detailed score page, legal information CMS page.
- FR, EN, ES, DE translations. Compatible with PrestaShop 8 and 9.