Carbon footprint module for products and orders
Display the carbon footprint (CO₂e) of each product and each order, and let the customer offset it from the shopping cart with a single click: a line item is added to the order with the exact amount, or you can cover it yourself. Includes a seal on the confirmation, customer account, back-office, and PDF invoice, as well as an annual dashboard with monthly breakdown and CSV export. Distance is displayed by country, postal code, or carrier. This is an indicative estimate, not a certified document.
Sustainability
Your customers are already asking how much what they buy pollutes.
And you don't have an answer at hand. RKR Carbon Footprint It calculates the carbon footprint (CO₂e) of each product and each order, displays it clearly, and allows the customer to offset it with a click in the shopping cart.
/ Each product, with its own unique imprint
If the manufacturer provides the data, you enter it per product or per combination. If you don't have it, the module estimates it by weight—10,000 g of CO₂e per kilogram by default, adjustable—and indicates this: the data sheet shows whether it's "manufacturer's value" or "estimated by weight." You can choose to only use the manufacturer's data, to always use estimates, or to combine both.
To make the figure clearer, it's translated into equivalents: kilometers driven by car (120 g per km) and days a tree absorbs carbon (25 kg per year). Both values are editable.
/ Compensate in the cart, without friction
The shopping cart displays the total carbon footprint of the order—products, packaging, and shipping—with a breakdown and a checkbox to offset it. If the customer selects this option, a "Carbon Footprint Offset" line item is added to the order with the exact amount, which also appears on the invoice.
The amount is calculated using the price per ton, accepts the tax you choose, and, in multi-currency transactions, is converted to the currency of the shopping cart.
/ The stamp remains on the order
When you validate your order, a photo of your fingerprint and the compensation status is saved. This appears as a stamp on the confirmation, in your customer account, on the back-office order, and on the PDF invoice. If you change any factors later, orders that have already been registered will not be overwritten.
/ An annual dashboard for your report
In the side menu, under "Carbon Footprint › CO2 Panel," you'll find the year's total, orders, breakdown by product and shipping, the amount offset (by customers and by the store), and a month-by-month breakdown. With one click, you can export orders as a CSV file, ready to open in Excel. There's also a widget on your desktop displaying the year's total.
/ The distance, however you want to measure it.
The transport formula uses 150 g per ton-km and a fixed 120 g per package by default, and each carrier can have their own. The Guide tab of the module itself contains the formulas and numerical examples.
Privacy. Only in postal code mode is the postal code and city of the delivery address sent to Nominatim, using the store's email address as identification. The customer's name, street address, and email address are not sent. If you don't want to send anything outside the postal code mode, use country or carrier mode, or point the module to your own Nominatim-compatible server.
/ What you should know
Compatible with PrestaShop 8.0 to 9.x version 1.1.9
Developed and maintained by REQUIRE
v1.7.2
Revision of 1.7.1 (LFR). Tested on PrestaShop 8.2.8 and 9.2.0 , with and without rkrmixmatchbox 2.23.0 , and the update 1.1.9 → 1.7.1 → 1.7.2.
Serious flaws in version 1.7.1 :
- The product data sheet would give a fatal error (blank page) as soon as the product had a footprint or was a box: the bridge log would receive a non-existent cart.
- The
selftestfeature used to return the contents of ANY shopping cart by its number, with a token that was the same for all visitors and published on the page. Now it only exists in debug mode and only for the user's own shopping cart. - The
?rkrcf_diag=1panel could be opened by any visitor (PrestaShop and PHP version, cart configuration and contents). Only in debug mode. - The log used to write to the module's folder on each page , with one file per cart that was never deleted (and in Nginx, readable from outside). Now it only writes in debug mode and to the kernel's
var/logs. Additionally: - Without rkrmixmatchbox installed, its table is no longer consulted, nor is it written to
error_logon each render. - The line hook (
displayProductPriceBlock) and the menu are no longer repaired on every request:upgrade-1.7.2.phpdoes it once (there was no upgrade from 1.1.9 to 1.7.1 ). - The Addons rules that version 1.7.x had lost are clean again:
Context::getContext(),Tab::getIdFromClassName,nofilter(the data of the boxes and the order lines go in adata-jsonattribute), HTML within the PHP (to templates), PHPStan and formatting. - Outside the package:
logs/,config_es.xmland a translation catalog in thetranslations/root that PrestaShop does not read. - The annual panel and desktop amount is displayed in currency format ("€0.30").
- Pending: footprint and weight figures also appear with a decimal point in Spanish ("4.34 kg CO₂e").
v1.1.9
Full revision of version 1.1.8 , tested on PrestaShop 8.2.8 , 9.0.0 and 9.1.5.
Failures that affected money or data:
- The compensation paid was recorded as €0. The customer paid the compensation line, but the order showed a zero amount: the annual panel, the CSV export, and the seal all said "compensated" with no amount.
- With the amount correctly registered, the stamp broke the page in PrestaShop 9 (confirmation, customer account, order in the back-office and PDF invoice): it used a function that PrestaShop 9 no longer has.
- Saving a product's footprint would leave it "without a footprint". From the "Footprint by product" panel, or by choosing "Module default" on the product page, the product would disappear from the page, listings, and shopping cart.
- Changing the compensation tax didn't affect the service product : it was charged differently than advertised (17% less when switching to 21% VAT). Now it's applied when saving, and the calculation uses the actual tax.
- National orders at 0 km. The centroid of Spain coincides with the default origin (Madrid) and national transport did not add anything; now it uses the configured average distance (350 km by default).
- Saving the Distances tab left the countries without coordinates at (0,0) —Gulf of Guinea—.
- In multi-currency transactions, the amount was displayed without conversion.
- A shopping cart divided into several orders had its footprint counted multiple times. Other arrangements:
- The service product is created as a virtual product (previously requiring shipping) and is removed upon uninstallation; upon reinstallation, it is no longer duplicated. The upgrade marks as virtual the products of stores that already had them.
- The compensation cart prices are automatically cleared when validating orders and with "Purge old carts".
- Only an employee with editing permissions can save or purge on the panel.
- Geocoding does not repeat the query to Nominatim for a postal code that it did not find, and it also works without
allow_url_fopen. - The compensation switch no longer deselects itself when another module prints warnings in debug mode.
- Original texts in English with a complete Spanish catalog (445 chains): the English store no longer displays the panel and shopping cart in Spanish. The back-office menu appears in each employee's language.
- Addons validator structure and rules:
index.phpin each folder,.htaccess,LICENSE.txt, nonofilter, no removed functions, PHPStan and PHP CS Fixer without warnings.
You might also like
Product Videos
Product Videos
Product Videos
4 other products in the same category
También podría interesarte
Questions and answers
Nobody has asked anything about this product yet.