Documentation

Installation, configuration and how the Carbon Footprint module works (materials → calculation → display).

Getting started

The module estimates a carbon footprint from materials (emission factors) linked to products with a presence percentage. Results are cached and can be displayed on product pages and in cart/checkout.

  1. Create materials (kgCO₂e/kg factor + source).
  2. Link materials to products (percentages).
  3. Check the product weight (PrestaShop “weight” field) to get a per-unit footprint.

If a product has no linked materials or has a zero weight, the footprint will be zero (or not displayed depending on hooks).

Installation

Install through Module Manager (Back office → Modules → Module Manager).

  1. Upload the ZIP and install the module.
  2. Configure the module (price per ton, display toggles, etc.).
  3. Use the module’s Back office tabs to manage materials and links.
  4. Optional: enable the CMS page (“calculation method”) for a “learn more” link.

The module creates its SQL tables on install and can create a hidden virtual “offsetting” product used for charging the offset amount.

Back office

The module adds a “Carbon footprint” group in the Back office (Catalog).

  • Materials tab: create/edit materials (multi-language).
  • Product / materials links tab: link materials to a product and manage percentages.

Each link update triggers a footprint recomputation (cache).

Materials

A material contains an emission factor (kgCO₂e/kg) and source metadata (label, URL, year), plus an active/inactive status.

  • Multi-language name and description.
  • Decimal emission factor (commas are converted).
  • Sources and notes for traceability.

From “Product / materials links”, select a product and manage a list of materials with a presence percentage.

  • Overview list: number of materials, % sum, EF/kg, EF/unit (if cached).
  • Per-product editing: bulk update percentages.
  • Quick add: add/update a material with a percentage.
  • Global recompute: “Recompute all footprints” button.

If the percentage sum exceeds 100%, the module scales values proportionally back to 100% during bulk updates.

Front display

The module can display an “estimated carbon footprint” card on product pages (depending on configuration).

  • Footprint per kg: weighted materials mix.
  • Footprint per unit: depends on product weight.
  • Optional “learn more” link to a CMS page (if enabled).

The card is rendered through product page hooks. On heavily customized themes, a small integration adjustment may be required.

Checkout offsetting

When enabled, an optional offsetting checkbox can be displayed in cart/checkout. The amount is computed from the cart footprint total (kgCO₂e) and a price per ton (€/tCO₂e).

  • Enable/disable via AJAX (module controller).
  • Amount rounded up to cents + optional minimum amount.
  • Status feedback (success/error) during update.

The front script updates standard cart total selectors. If your theme/checkout is customized, selectors may need adjustment.

CSV & exports

Sample CSV files are copied into the Back office import directory to help you bootstrap data.

  • Samples: materials and product/material links (“samples” files).
  • CSV export: “Export product footprints (CSV)” from the links tab.
  • Export includes: EF/kg, EF/unit, weight used and computation date.

Exact CSV formats depend on your PrestaShop import mapping. Samples are provided as a starting point.

Multistore

The module is compatible with multistore (installation, configuration and display). Footprints are cached and used in the current shop context.

Recommendation: if you use different data per shop (weights/links), validate behavior in your multistore context (tests).

FAQ

Nothing shows on the product page

Check that front display is enabled, the product has linked materials, and your theme includes the relevant hooks. As a baseline, test on the Classic theme.

Footprint is 0

Check product weight and materials links (% + active materials). Without linked materials or with zero weight, per-unit footprint can be zero.

Cart total is not updating

The module updates standard selectors. If your theme changes checkout markup, the JS selectors may need adjustment.

I want to change the offsetting label

You can configure the checkbox label in the module settings. You can also edit the module translations in PrestaShop.

Percentages were adjusted to 100%

During bulk updates, if the percentage sum exceeds 100, the module scales values proportionally back to 100%.

Note
The module is continuously improved. A functional and technical review can be done before Addons publication (theme/checkout compatibility, multistore robustness, logs, etc.).