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.
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.
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.
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.
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.
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.
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.
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.
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.
There are no reviews yet.