Solidarity Rounding & Checkout Donation — Complete Guide
Install, configure and use solidarity rounding and checkout micro-donations (three modes, VAT-free donation, donation tracking) for PrestaShop 8 and 9.
Overview
The Solidarity Rounding & Checkout Donation module (dfsolidarityround) lets your customers support a charity in seconds, right inside the cart: by rounding their order up to the nearest euro, by choosing a predefined donation amount, or by entering a free amount. The donation integrates cleanly into the total — VAT, currency and multistore being handled by the PrestaShop core, all the way to the invoice.
The donation is not a mere display: it is carried by a dedicated virtual product and a specific price limited to the customer’s cart. The amount therefore appears naturally in the totals, the order and the invoice.
Compatibility
- PrestaShop 8.0 to 9.x
- Single-store and multistore
- PHP 7.4 to 8.3
- Classic theme and custom themes
- Interface bundled in French, English, Spanish, German and Italian
- No dependency (neither Composer nor framework)
Installation
- In the back office, open Modules > Module Manager.
- Click Upload a module and select the
dfsolidarityround.zipfile. - Once installed, click Configure.
On installation, the module creates its history table, registers its hooks (front resources, cart and checkout block, order validation), adds the back-office Solidarity donations tab and generates a hidden virtual product “Solidarity donation”: not visible in the shop, VAT-free, with no shipping fees. It is what carries the donation amount in the cart. Do not delete it manually.
Configuration
Donation modes
Three modes are available and can be enabled independently. You can offer just one, or all three at once.
- Round up to the nearest euro: invites the customer to bring their order up to the next round amount. The rounding step is configurable (
1.00for the nearest euro,0.50for the half-euro, etc.). - Fixed amounts: displays ready-to-click buttons. The list of amounts is configurable (for example
1;2;5). - Free amount: lets the customer enter the sum of their choice, bounded by a minimum donation and a maximum donation.
In round-up mode, if the cart total is already a round amount, the module offers a donation of one full step so that the customer’s opt-in always makes sense.
Charity customization
- Block title: heading shown at the top of the block (multilingual field).
- Charity name: name of the supported cause (multilingual field).
- Description: short accompanying text (multilingual field).
- Charity logo: image shown in the block (PNG, JPG, GIF, WEBP or SVG).
Display locations
- Show on the Cart page: displays the block at the bottom of the cart page (main, reliable location).
- Show in the checkout funnel: displays the block in the order summary, if your theme exposes the matching location.
How it works for the customer
Round up to the nearest euro
The customer sees a button such as “Round up and donate €0.73”. The proposed amount is the difference between their total and the next round amount, according to the configured step.
Fixed amounts
The customer clicks one of the proposed amounts (€1, €2, €5…). The matching donation is added immediately.
Free amount
The customer enters the amount of their choice and confirms. The value is checked against the defined minimum and maximum.
Once the donation is added, the block shows a thank-you message and a “Remove the donation” link. The customer stays in control: they can change the amount or remove their donation at any time before payment.
How the donation is added to the cart
On each choice, the module creates a specific price (SpecificPrice) limited to the current cart (id_cart) and applies it to the “Solidarity donation” virtual product. This product is added to the cart when the amount is greater than zero, removed otherwise. PrestaShop then applies the currency and multistore context, and the donation appears as a clear line in the totals, the order and the invoice.
Automatic recalculation of the round-up
In round-up mode, the donation amount is recalculated every time the block is displayed. So if the customer changes their cart after choosing the round-up, the donation stays consistent with the new total until payment.
VAT-free donation
The “Solidarity donation” product is created without any tax rule: the amount shown and collected matches the customer’s gesture exactly, with no VAT surprise.
Donation tracking in the back office
A Solidarity donations tab is added under Orders (controller AdminDfDonations). It lists each donation with:
- the donation amount;
- the mode used (round-up, fixed amount or free amount);
- the customer and the related order;
- the date of the donation.
A summary banner shows the total collected and the number of donations. The donation is frozen in the history when the order is validated (actionValidateOrder).
Paying the donations to the charity
The module does not automatically pay donations over to the charity: this is on purpose. It collects donations within your orders and gives you the total and the history. You keep control over when and how you pay the funds over to your partner charity, according to your own process.
PrestaShop 9 compatibility
The module is designed and tested from PrestaShop 8.0 to 9.x:
- the back-office controller uses
ModuleAdminController, compatible with 8 and 9; - the code avoids methods removed in PrestaShop 9 (portable AJAX token and price formatting);
- the AJAX controller returns JSON directly, with no incompatible signature override.
FAQ and troubleshooting
The block does not appear in the checkout funnel
The block displays reliably at the bottom of the cart page. In the order summary, the display depends on the theme, which must expose the matching location. The donation chosen on the cart page is kept until payment in any case.
The total is not updated after the click
The block triggers a cart refresh after the donation is added or removed. Clear the PrestaShop cache, then reload the page. Also check that the “Solidarity donation” product has not been deleted manually.
The shop turns white after installation
Make sure you are using the latest version of the module and clear the cache. The donation product is deliberately not visible in the shop; do not make it visible and do not delete it manually.
The round-up donation looks wrong
Check the configured rounding step. In round-up mode, the donation is recalculated each time the block is displayed, from the total excluding the donation; if the cart changes, the amount is adjusted automatically.
How do I translate the block into another language?
The title, the charity name and the description are multilingual fields: select each language in the configuration to translate them. Interface labels are translated via Advanced Parameters > Translations > Translations of installed modules, choosing dfsolidarityround.
Is it compatible with PrestaShop 9?
Yes. The module is designed and tested from PrestaShop 8.0 to 9.x, in single-store as well as multistore.
Uninstallation
Uninstalling removes the “Solidarity donation” product, the back-office tab and the donation history table. If you want to keep the history, disable the module without uninstalling it.