PrestaShop Marketing & Promotions

PrestaShop 8 & 9 Quantity Discount Module — Buy X Get Y Free & Promo Badges

Five quantity promotion mechanics, each with the badge that sells it on the product thumbnail.

A "buy 4 get 2 free" badge sitting on the thumbnail does more work than a banner at the top of the page: it announces the offer while the customer is deciding how many to take. This module builds the quantity offers retail runs on, shows them on listings and product pages, and applies the discount in the cart with no promo code. The cheapest items of each set are the free ones, as commercial practice expects.

At a glance
  • Five offer types: buy X get Y free, Nth at -X%, Nth at a fixed amount off, Nth at an imposed price, pack price
  • Promo badge on the product thumbnail: five shapes, four positions, colours set per offer
  • Discount applied in the cart through a private rule, with no code to enter
  • Targeting by product, category, manufacturer or whole catalogue, with priority between offers
  • PrestaShop 8.0 to 9.x, multistore, five languages, no override
PrestaShop 8.0 to 9.x 5 offer types Thumbnail badges Multistore No override
  • 30-day refund
  • 12 months updates
  • 24h support
www.datafirefly.com/en/
Buy X get Y free offer shown with a promo badge on a PrestaShop product page
v1.0.0 · updated 2026-07-27
What it does

The short version.

01

Buy X, get Y free

The 4+2, 3+1 or 2+1 format. The engine finds complete sets in the cart and gives away the cheapest units of each set.

02

Nth item discounted

2nd at -25%, 3rd at -50%, 2nd at 1 euro. Three variants: percentage, fixed amount off, or imposed price.

03

Pack price

3 for 10 euros, 5 for 20 euros. The engine covers the gap between the sum of unit prices and the advertised pack price.

04

Badge on the thumbnail

Free text translated into five languages, five shapes, four image corners, background and text colour set per offer.

05

Mix and match

Quantities add up per product, per combination, or across every product attached to the offer.

The long version

Everything you'd want to know before you install.

A detailed look at how PrestaShop 8 & 9 Quantity Discount Module — Buy X Get Y Free & Promo Badges works, why we built it the way we did, and the thinking behind the features above.

§ 01

The badge makes the sale, not the cart rule

A discount configured in PrestaShop stays invisible until the customer has reached the quantity. The badge reverses that: it announces the offer while the customer browses the category, at the exact moment the quantity decision is made. That is why the module treats display and calculation as one object. You create an offer, and both the badge and the discount follow from it.

§ 02

Five mechanics covered

Buy X get Y free covers 2+1, 3+1 and 4+2. The discounted Nth item covers 2nd at -25%, 3rd at -50% and every other rank. Two variants complete that format: a fixed amount off the Nth item, or an imposed price such as the 2nd at 1 euro. The fifth type is pack pricing, 3 for 10 euros, useful when you would rather advertise a round price than a percentage.

§ 03

Which item is free

The engine sorts eligible cart units by descending price and applies the benefit to the cheapest of each set. That is the rule supermarkets use and the one customers expect. On a 3+1 set made of items at 20, 15, 10 and 5 euros, the free item is the one at 5 euros.

§ 04

How quantities are grouped

Three grouping modes are available. Per product, all combinations together: six bottles of the same shower gel trigger the offer even across three different scents. Per combination: each variant counts on its own. Mix and match: every unit of the products attached to the offer feeds the same count, which lets you run a 4+2 across a whole range rather than a single reference.

§ 05

Priority and unit consumption

When several offers target the same product, priority decides the order of application. A unit already consumed by one offer leaves the calculation for the next ones, so the same item is never given away twice. With seven items and a 4+2 offer, six units are consumed and the seventh stays available for another offer.

§ 06

What happens in the cart

On every cart change the engine recalculates the discount total and syncs a private cart rule whose internal code starts with DFQD. The customer sees a single discount line and has no code to enter. An optional breakdown under the cart details how much each offer contributes. When the order is placed, the rule is deactivated and detached from the module, but stays attached to the order for your accounting exports and credit notes.

§ 07

Badge customisation

The badge text accepts variables carrying the offer values: purchased quantity, free quantity, rank of the discounted item, discount value and its formatted price equivalent. You write "buy 4 get 2 free" or "2nd item at -25%" directly, in five languages, or leave the field empty for automatic generation. Background colour, text colour, shape and position are set offer by offer, which lets you tell a seasonal operation apart from a permanent one.

§ 08

Technical integration

The module hooks into displayProductPriceBlock for the badge, displayProductAdditionalInfo for the offers table and displayShoppingCartFooter for the cart breakdown. A front script moves the badge into the thumbnail container so it sits over the image, then replays that placement after Ajax refreshes from faceted search, pagination and quick view. No class or controller override is installed, and the CSS is namespaced under the dfqd prefix.