Spare Parts Availability (dfspareparts)
Display the spare parts availability period on the product page, order and invoice, in compliance with article L111-4.
The Spare Parts Availability module shows, for each product, the period during which or the date until which spare parts are available, in line with the information obligation of article L111-4 of the French Consumer Code. The information appears before purchase (product page) and as written confirmation at the time of purchase (order page and PDF invoice).
Compatibility
- PrestaShop 8.0 to 9.x, single and multistore.
- PHP 8.1 and above.
- French interface, strings translatable through the PrestaShop translation system.
Installation
- In the back office, open Modules > Module Manager.
- Click Upload a module and drop the
dfspareparts.zipfile. - Click Install. The module creates its table, its product tab and registers its display hooks.
The data table is kept on uninstall: you do not lose your entries if you reinstall.
General settings
Open the module configuration page (Configure). You will find:
- Displayed label: the heading shown to the customer (default “Spare parts availability”).
- Show on the product page / order confirmation / PDF invoice: enable or disable each location.
- Hide when not set: show nothing for products with no information and no default value.
- Default values: status, duration, unit and starting point applied to products not set individually.
Setting a product
On the product page (back office), open the Spare parts availability tab. Choose a status:
- Available — duration: enter a duration (years or months) and a starting point (placing of the last unit on the market, or purchase date).
- Available — until a date: select an end date.
- Not available: indicates there are no spare parts for this product.
- Not set: the product inherits the module default values.
An optional additional note can be appended, and a live preview shows the text as it will be displayed.
The preview also reflects inheritance: if the product stays “Not set”, the preview shows the configured default value.
Bulk assignment
Still on the configuration page, the Bulk assignment panel applies the same information to a set of products:
- by selected categories, or across the whole catalog of the current store;
- choose the status, duration and starting point, then click Apply.
Bulk assignment replaces the individual values already set on the affected products. The Reset all button clears the data for the current store.
Where the information is shown
- Product page: a notice under the price and the add-to-cart button (hook
displayProductAdditionalInfo). - Order confirmation: a summary of the affected products (hook
displayOrderConfirmation). - PDF invoice: a block repeated on the invoice (hook
displayPDFInvoice).
Multistore
Data and settings are managed per store. Fill in each store in its own context; bulk assignment acts on the current store.
Legal notes
The module provides the display and input framework compliant with article L111-4. The accuracy of the durations entered depends on the information provided by the manufacturer or importer. This module is not legal advice.
Troubleshooting
- Nothing shows on the product page: check that the product page display is enabled, and that the product is set (or that a default value exists and “Hide when not set” is disabled).
- Nothing on the invoice: if you use a heavily customized invoice template, check that the
displayPDFInvoicehook is present in your template.