Total Products Sold Counter: setup and help

Quick start

  1. Upload and install the module ZIP in Modules > Module Manager.
  2. Open Total Products Sold Counter > Configure.
  3. Leave Enable on.
  4. Set Minimum sales to display and choose Display format.
  5. Click Save and open a product whose count for the selected format reaches your minimum in the current shop.
  6. Confirm the badge matches that count. Your theme must call displayProductAdditionalInfo on PrestaShop 1.7 or later, or displayProductButtons on PrestaShop 1.6, with the product data.

Setup manual

Installation and first configuration

Follow the steps in Quick start.

Total Products Sold Settings

Open Modules > Module Manager > Total Products Sold Counter > Configure. You reach Settings, with the Total Products Sold Settings form.

Setting Installed default Use
Enable On Hide or show the counter without uninstalling.
Minimum sales to display 5 Show the badge when the selected count reaches this value. At 10, a count of 9 stays hidden.
Display format {count} sold Choose {count} sold, {count} orders, or {count} customers bought this. There is no free-text editor.

Click Save. For example, choose a minimum of 25 and {count} customers bought this to show the badge once at least 25 distinct customers have ordered this product in valid orders from the current shop.

How your sales count is calculated

The module counts sales of the current product across all combinations, including only orders marked as valid by PrestaShop in the current shop.

Display format selects the calculation: {count} sold sums ordered units, {count} orders counts distinct orders containing the product, and {count} customers bought this counts distinct customers who ordered it. The minimum applies to the selected count.

The count covers all dates and is limited to the current shop, including in a shared multistore database. The module does not subtract refunded quantities separately or offer a legacy-sales offset. Only orders marked as valid by PrestaShop are included, with no selectable order statuses.

For {count} sold, you can inspect the query below using your actual database prefix, product ID and current shop ID. For the order or customer formats, replace SUM(od.product_quantity) with COUNT(DISTINCT o.id_order) or COUNT(DISTINCT o.id_customer), respectively:

SELECT SUM(od.product_quantity)
FROM ps_order_detail od
INNER JOIN ps_orders o ON o.id_order = od.id_order
WHERE od.product_id = 123
  AND o.id_shop = 1
  AND o.valid = 1;

The module calculates the value when the hook is rendered. It has no module-level cache for this count.

Storefront placement and styling

Your theme must call displayProductAdditionalInfo on PrestaShop 1.7 or later, or displayProductButtons on PrestaShop 1.6, with the product data. The module returns no output if it is disabled, the product ID is missing, or the selected count is below your threshold. It does not add badges to category thumbnails.

The output is a green .mprsold-badge with a check icon and the escaped text. Its exact position depends on your theme's hook placement.

You can customize it in your theme stylesheet:

.mprsold-badge {
    background: #f0f7f0;
    color: #2e7d32;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}
.mprsold-badge svg {
    width: 16px;
    height: 16px;
}

For a template change, use the theme override location:

themes/your-theme/modules/mprtotalproductssold/views/templates/hook/sold.tpl

The module assigns mprsold_text. Render it with:

{$mprsold_text|escape:'htmlall':'UTF-8'}

Verification and troubleshooting

  1. Choose a product with a known count for the selected format in valid orders from the current shop.
  2. Confirm the expected total with your order data or the query above.
  3. Set Minimum sales to display at or below the total and save.
  4. Open that product page and confirm the text.
  5. Raise the threshold above the total and confirm the badge disappears.

If the badge is missing, check Enable, the threshold, the order valid flags, and your theme's displayProductAdditionalInfo hook (PrestaShop 1.7 or later) or displayProductButtons hook (PrestaShop 1.6). Check the configuration page's installation integrity banner for missing infrastructure. Do not expect an individual combination count or a category-listing badge.

Disable or uninstall

Set Enable to No and save to hide the counter while keeping settings. Uninstall through Module Manager to remove the module menu and its configuration entries. Your order history is read by this feature; the uninstall method does not delete your orders.

Compatibility

Requires PrestaShop 1.6 or later and PHP 7.1 or later.

Reference screenshots

Total Products Sold Counter, Storefront multiple products

Total Products Sold Counter, Admin minimum count

Total Products Sold Counter, Storefront product counter

Total Products Sold Counter, Admin sold format

Total Products Sold Counter, Sold trust signal

Questions

No questions about this module yet

Ask anything about installation, compatibility or setup. Answers appear here.

Known Issues

4

Counter includes cancelled and refunded orders in the total

Open

The sold counter increments on order creation but never decrements when orders are cancelled or refunded, showing an inflated total.

Resolution note

Added hooks for actionOrderStatusUpdate that adjusts the counter when an order transitions to cancelled, refunded, or error states.

Translated labels remained in English

ResolvedUpdated:
Fixed in: 1.0.20
Module labels could remain in English even when translations were available.

PHP 7.1 compatibility

ResolvedUpdated:
Fixed in: 1.0.16
The module could fail to load because its packaged dependencies required a newer PHP version.

Damaged translations

ResolvedUpdated:
Fixed in: 1.0.15
Some translated module labels contained damaged text.

Feature Requests

4

Implemented

One-click module updates

Implemented
Check for and install module updates from the back office.

Multilingual interface

Implemented
Use translated module labels and messages in French, German, Spanish, Italian and Polish.

Installation checks and repair

Implemented
Check the module installation and restore missing back-office menu entries.

Product sales counter

Implemented
Display a sold-count badge on product pages using recorded order quantities.

Changelog

v1.0.142026-09-05

  • Addedcomplete FR/DE/ES/IT/PL translations
Older releases

v1.2.02026-04-20

  • Addedadmin menu management via MenuInstaller for streamlined module setup

v1.1.02026-01-27

  • AddedPS 9 / Hummingbird theme compatibility
  • Addedconfigurable label text with translation support per language
  • Improvedcounter sourcing — now uses validated order states only (excludes cancelled)
  • Fixedcounter not appearing on combination products when specific reference selected

v1.0.02025-03-13

  • Initialrelease: total products sold counter for PrestaShop product pages
  • InitialDisplays real aggregate sold quantity from order history
  • InitialConfigurable display threshold — hide counter until minimum sales reached
  • InitialCompatible with PS 1.7.x and PS 8.x

Demo

Test the full module before you buy

Buy a licence later and keep your settings.

  • Your 30-day demo Test it on your own shop for 30 days from the first install.
  • Ready demo shop Explore a ready demo shop in your browser.
  • No registration No account, email or store domain needed.
Launch demo shop

By downloading, you accept the demo terms and privacy policy.

By opening this demo you accept the demo terms and the privacy policy.

Loading...
Back to top