PS PrestaShop Beginner

“From” Price Module (dffromprice) — Documentation

Install and configure the dffromprice module: display the "From" price and the best per-quantity price on PrestaShop 8 and 9 product listings.

Updated Module version 2.0.0

The dffromprice (“From”) module displays the lowest per-quantity price right on your product listings whenever a product has a quantity discount. This documentation covers installation, full configuration and troubleshooting.

Overview

When a product has quantity discounts (for example “buy 3 = save 20%”), this information is only visible on the product page, at the very bottom. The module surfaces a “From X” label on the product thumbnail, in categories, search, cross-selling and featured-product blocks. The displayed price is calculated with PrestaShop’s native mechanism, taking into account the customer group, currency, country and tax calculation method.

Installation

Via the back office

  1. Go to Modules > Module Manager.
  2. Click Upload a module and select the module’s ZIP file.
  3. Once the upload completes, the module installs automatically and registers its hooks.

Via FTP

  1. Unzip the archive and drop the dffromprice folder into your shop’s /modules directory.
  2. In Modules > Module Manager, search for “From” and click Install.

After installation, clear the PrestaShop cache (Advanced Parameters > Performance > Clear cache) so the module’s CSS is applied.

Settings

Configuration is found in Modules > Module Manager > dffromprice > Configure. It is organised into two panels.

Display

  • Enable module: master switch.
  • Show on product listings: categories, search, cross-selling, featured products.
  • Show on product page: adds the “From” price after the main product-page price.
  • Label: text shown before the price, translatable per language (“From”, “À partir de”…).
  • Show minimum quantity: indicates the quantity required to get the best price.
  • Quantity label: text accompanying the quantity, with the %qty% variable (e.g. “from %qty% units”).
  • Show savings percentage: “-21%” badge based on the gap between the base price and the best per-quantity price.
  • Tax label (incl./excl. tax): Never, Follow shop settings, or Always.
  • Display mode: Replace the regular price or Show in addition to the regular price.
  • CSS selector(s) to hide: in replace mode, CSS selectors hidden when the “From” price is displayed.

Appearance and restrictions

  • Text color: color picker, #f1a019 by default.
  • Minimum savings to display (%): hides the “From” price if savings are below this percentage. 0 = always display.
  • Excluded product IDs: comma-separated list of IDs.
  • Excluded category IDs: comma-separated list of IDs (based on the product’s default category).
  • Custom CSS: added on every front-office page, to target the .df-fromprice block and its children.

How the price is calculated

The module relies on SpecificPrice::getQuantityDiscounts() with the same parameters as the native “Quantity discount” table (shop, currency, country, customer group, customer). For each quantity tier greater than 1, the actual unit price is calculated via Product::getPriceStatic(). The “From” price is only shown if this price is strictly lower than the base price. A static cache per product and combination guarantees a single calculation query per thumbnail within a page.

Theme compatibility

The module hooks into displayProductPriceBlock, present in every standard PrestaShop product listing. In replace mode, the regular price is hidden by the configurable CSS selector. The default value covers Classic-based themes and the Falcon theme:

.df-fromprice + .wrapper-price-taxe, .df-fromprice + .price

For another theme, inspect the price container in the thumbnail and adjust the selector accordingly.

Troubleshooting

The “From” price does not appear

  • Check that the product actually has a quantity discount (quantity tier greater than 1) and that the tier price is lower than the base price.
  • Check that display on product listings is enabled.
  • Review the minimum savings threshold: if it is too high, the display may be blocked.
  • Make sure the product or its category is not in the exclusions.

The regular price stays visible in replace mode

The hide CSS selector does not match your theme’s price container. Adjust the “CSS selector(s) to hide” field, then clear the cache.

After any change to the settings or CSS, clear the PrestaShop cache and regenerate the CSS file to apply the changes.

Was this page helpful?

Still stuck? Contact support