# Spare Parts Availability (dfspareparts)

> 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…

- Page: <https://www.datafirefly.com/en/documentation/dfspareparts/>
- Language: en
- Last updated: 2026-06-18
- Other languages: [fr](https://www.datafirefly.com/documentation/dfspareparts/index.md), [es](https://www.datafirefly.com/es/documentation/dfspareparts/index.md), [de](https://www.datafirefly.com/de/documentation/dfspareparts/index.md), [it](https://www.datafirefly.com/it/documentation/dfspareparts/index.md), [pl](https://www.datafirefly.com/pl/documentation/dfspareparts/index.md), [pt](https://www.datafirefly.com/pt/documentation/dfspareparts/index.md), [nl](https://www.datafirefly.com/nl/documentation/dfspareparts/index.md)
- Index: <https://www.datafirefly.com/en/documentation/llms.txt>

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

1. In the back office, open _Modules > Module Manager_.
2. Click _Upload a module_ and drop the `dfspareparts.zip` file.
3. 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 `displayPDFInvoice` hook is present in your template.
