1. What this module does
Show the lowest price from the last 30 days next to every discount, as the EU Omnibus directive requires. The module keeps a history of the prices of your products and combinations and prints a line such as "Lowest price in the 30 days before the discount: €24.00" under every discounted price, on the product page and on product tiles. It helps you meet the price reduction rule of the Omnibus directive (EU 2019/2161).
Works with PrestaShop 1.7.8, 8.x and 9.x (PHP 7.2.5 or newer), with the Classic and Hummingbird themes and with multistore.
2. Installation
- Download the module from My account → Order history at addonspresta.com.
- In your Back Office, open Modules → Module Manager and click Upload a module.
- Drop the
ap_omnibus_v1.0.0.zipfile and wait for the confirmation. - Click Configure on the module card.
If you have shell access, you can also unpack the zip into modules/ and run
php bin/console prestashop:module install ap_omnibus from the shop folder.
Right after the installation the line is on for the product page and for product tiles, with a period of 30 days. The price history is still empty: the installation records nothing, so that a large catalogue cannot make it time out. On the configuration page, click Check prices now in the Price check panel to record the current prices at once, then set up the cron job described in "Features and settings". Without a cron job, shop visits fill the history in small steps.
3. How it works
What is recorded. For every active product, each of its combinations and every active currency of the shop, the module records the price that a visitor who is not logged in pays for one piece in the default country of the shop: tax excluded and tax included, with specific prices, catalogue price rules and the reduction of the visitor group applied. A price counts as discounted when a specific price with a reduction applies to it — the same rule that makes your theme show the crossed-out price. A new entry is written only when the price or its discount status changes, so one entry means "from this moment the price was X". Prices of zero are not recorded. During the catalogue check, entries older than 400 days are deleted; the newest of them is kept, so the module still knows the price that was in force at that time.
When prices are recorded.
- When you save a product, a combination or a specific price, the module records the new prices of that product at the end of the save, in every shop the product belongs to. When you save a catalogue price rule, or when one action changes more than 200 products, it restarts the catalogue check instead.
- The catalogue check goes through all active products, shop by shop, and records every price that differs from the history. It finds the changes that no save reports: discounts that start or end on a date, catalogue price rules, tax rates and exchange rates. It is started by the cron job, by shop visits (Check prices during shop visits) and by the Check prices now button, works in short steps and continues where the last step stopped.
- When the storefront shows a discounted product whose discount the history does not know yet — for example a discount that started at midnight, before the next check — the module records that product at once, at most 20 products per page.
Why a cron job matters. A discount with a start or end date, a catalogue price rule, a new tax rate or a new exchange rate changes prices without anyone saving anything. The catalogue check records such a change when it next reaches the product, so the more often it runs, the closer the dates of the history are to the real ones. Shop visits run the check too, but only in steps of one second and only while there are visitors, which is enough for a small catalogue with regular traffic. For a large catalogue or a quiet shop, use a cron job.
What the line shows. The lowest price is worked out once, at the moment the discount is recorded: the lowest price that was in force during the period (30 days by default) before it — the prices recorded during the period and the one that was in force when the period started. It is saved with the discount, so the line shows the same amount for the whole discount, until its price changes again. The amount is shown in the visitor's currency, tax included or excluded (Lowest price shown).
Where the line appears.
- On the product page, below the price, also in quick view. When the customer selects another combination, the line follows it.
- On product tiles, below the price: categories, search results, the home page and the product lists of other modules.
- Not in the cart, at checkout or in the order confirmation.
- Only on discounted products. A product without a discount gets no line.
The line uses the fonts and colours of your theme, a little smaller and lighter than the price. It needs no
JavaScript and is printed in the standard price block of the theme (hook displayProductPriceBlock), which Classic
and Hummingbird have.
Right after installation. The history starts on the day you install the module: the module cannot know older prices. During the first weeks, the lowest price is based on what has been recorded since then. A discount that was already running when you installed the module has no price recorded before it, so the line shows the regular price or nothing, as chosen in When the history does not reach before the discount. Every discount that starts after the first check gets its lowest price from the history.
Limits.
- The history holds the prices of a visitor in the default country of the shop. Customers of other groups and visitors from other countries see the same lowest price; with tax included, it is calculated with their tax rate when it differs from the rate of the default country.
- Discounts that apply only from a certain quantity, to a customer group or to a country are not part of the history. When the theme shows such a discount, the line shows the regular price, or nothing with Show nothing.
- The module does not change prices, specific prices or catalogue price rules, and it does not show a price chart or any line on products without a discount.
The module stores its settings and its own price table. It does not change PrestaShop tables, sets no cookies and does not connect to addonspresta.com or any other server.
4. Features and settings
Open Modules → Module Manager → Omnibus Lowest Price → Configure. The Help box at the top links this manual and the module page at addonspresta.com in the language of your Back Office, gives our support address and shows the installed version. Below it are the Settings form with its Save button and two panels: Price check and Price history of a product.
Show on the product page
Shows the line below the price on the product page and in quick view; it follows the selected combination. On by default.
Show on product tiles
Shows the line on product tiles: categories, search results, the home page and every other product list. On by default.
Text on the product page
The text of the line on the product page, for each language. {price} is replaced by the amount and {days} by the
period. By default "Lowest price in the {days} days before the discount: {price}", with Polish, French, German,
Spanish and Italian texts filled in at installation for those languages and the English text for the others. The
text must contain {price}, is required in the default language and can have up to 255 characters. It is plain text:
the characters < and > are refused. A language left empty, or added after the installation, uses the text of the
default language.
Text on product tiles
The same for product tiles, where space is short. By default "Lowest {days}-day price: {price}". The same rules apply.
Period in days
How far back from the discount the lowest price is looked for: 30 days by default, from 30 to 365. The directive
requires at least 30 days. Because the lowest price is saved with the discount, a new value applies to discounts
recorded after the change; a discount already running keeps its amount until its price changes. {days} in the texts
shows the new value at once.
Further price drops during a discount
What happens when you lower the price again while a discount is running. An example: a product costs €100 for months. On 1 March you reduce it to €80, on 11 March to €70.
- Every change of the discounted price starts a new period (default) — from 11 March the module looks at the 30 days before that day: €100 until 1 March, then €80. The line shows €80. This is the strict reading: every new reduction is compared with the prices just before it.
- Keep the lowest price found before the first reduction — the line keeps showing €100, the lowest price of the 30 days before 1 March, for as long as the discount runs without a break.
Countries differ on discounts that are increased step by step; check the rule of the country you sell in. A discount counts as one as long as the product is not back at its regular price in between. Both values are saved with every discount, so changing this setting changes the amount at once.
When the history does not reach before the discount
What the line shows when no price was recorded before the discount — typically a discount that was already running when you installed the module:
- Show the regular price (default) — the price before the discount, as your theme shows it crossed out;
- Show nothing — no line for that discount.
The same choice applies when the theme shows a discount that is not part of the history (quantity, customer group or country).
Lowest price shown
- Like the other prices the visitor sees (default) — tax included or excluded, as your shop shows prices to the visitor's customer group (Shop Parameters → Customer Settings → Groups, price display method).
- Always tax included.
- Always tax excluded.
Check prices during shop visits
For shops without a cron job: storefront visits run the catalogue check in steps of one second, at most one step every 20 seconds, and a new pass through the catalogue at most once an hour. On by default; with a cron job you can switch it off.
Send the lowest price to PriceWars feeds
For the module PriceWars - Product Feeds up to version 1.1: offers with a discount receive the lowest price of the history, adjusted like the offer's own price (price modifier and quantity multiplier of the feed). PriceWars 1.2 and later read the lowest price themselves, according to their own setting, and this switch then has no effect. Without PriceWars it does nothing. On by default.
Price check
The panel shows, for each shop of the current Back Office context that you manage:
- Products checked in the current pass — how far the catalogue check has got, for example "120 of 480";
- Last complete check — the date of the last complete pass, or "not yet";
- Products with history and Recorded prices — the size of the history.
Check prices now runs the check for up to 15 seconds in those shops and says how many products it checked and how many prices it recorded. When it has not reached the end of the catalogue, click again, or leave the rest to the cron job and shop visits.
Address for the cron job
Copy the address from the panel and add a task in your hosting panel (or the server's crontab) that calls it at least once a day, better every hour, for example:
0 * * * * curl -fsS "https://your-shop.com/module/ap_omnibus/cron?token=…" >/dev/null
Use the address exactly as the panel shows it; without friendly URLs it starts with index.php?fc=module. One
address checks every shop of the installation. Each call works for up to 20 seconds and continues where the previous
one stopped, so a large catalogue needs several calls for one complete pass. After a complete pass the next one starts
at the earliest 5 minutes later; until then the address answers resting. The address contains a secret token:
anyone who knows it can start the check, nothing else. If it leaks, click Replace the cron address — shown only to
an employee who manages every shop — and put the new address in your cron job: the old one stops working at once.
Price history of a product
Enter a Product ID and click Show history to see the last 200 prices recorded for that product, newest first: Date, Shop, Combination, Price (tax excl.), Price (tax incl.), Discounted and the lowest earlier price tax excluded and included, as chosen in Further price drops during a discount ("–" when the history does not reach before the discount). Amounts are shown in their currency. Only the shops of the current context that you manage are listed.
5. Multistore
Settings are saved for the shop or shop group selected in the Back Office header. Select All shops to set the same values everywhere, or a single shop to give it its own texts, period and options. In the All shops or group context only an employee who manages every shop of that context can save.
The price history is kept for each shop separately, in that shop's currencies and with its specific prices. A product removed from one shop keeps its history in the others. The cron address checks every active shop of the installation; Check prices now and both panels work on the shops of the current context that you manage. One licence covers every shop of the installation.
6. Uninstall
Module Manager → Omnibus Lowest Price → Uninstall deletes the settings and the whole price history. It cannot be restored: after a new installation the history starts again from zero, and discounts that are running then show the regular price or nothing. Remove the cron job from your server too.
To keep the history, use Disable instead. While the module is disabled it shows nothing and records nothing; after you enable it again, the next check records the current prices.
7. FAQ and troubleshooting
The line shows the regular price right after installation. The discount was already running when you installed the module, so no price was recorded before it. The line shows the regular price until that discount ends; choose Show nothing in When the history does not reach before the discount if you prefer no line. Discounts that start after the installation get their lowest price from the history.
There is no line although the product is discounted.
Check that Show on the product page or Show on product tiles is on and clear the cache in Advanced
Parameters → Performance. With Show nothing, there is no line when the history does not reach before the
discount, and none for discounts that apply only from a certain quantity, to a customer group or to a country, which
are not part of the history. With a theme other than Classic or Hummingbird, check in Design → Positions that the
module is attached to displayProductPriceBlock; if the theme does not call that hook, show the line with the
widget described below.
The price in the line is lower than the current price. That is expected when the product cost less at some point during the period before the discount, for example during an earlier discount. The directive asks for the lowest price of that period, not for the regular price.
I changed the period and nothing changed. The number of days in the text changes at once, but the lowest price is saved with each discount when it is recorded. A discount that is already running keeps its amount until its price changes; the new period applies to discounts recorded after the change.
A discount that started today has no line yet, or the regular price. A discount with a start date is recorded by the next catalogue check, or as soon as the product is shown in the storefront. Run Check prices now or check that the cron job calls the address.
The cron address answers "invalid token". The address was replaced or not copied in full. Copy it again from the Price check panel.
The text is still in English in one of my languages. The texts are settings: change them in Text on the product page and Text on product tiles for that language.
Can I show the line elsewhere in my theme?
Yes. Your developer can add {widget name='ap_omnibus' product=$product} to any product template, or
{widget name='ap_omnibus' product=$product list=true} for the shorter text of the tiles. The README.md file in the
module zip, section "Customising", explains how to change the look from your theme.
Is this legal advice? No. The module helps you meet the requirement of the Omnibus directive (EU 2019/2161) to show the lowest earlier price with a price reduction. The directive leaves some points to each country, notably discounts increased step by step. Check the rules of the country you sell in, and choose the settings accordingly.
8. Updates and support
Updates are free for life: download new versions from My account → Order history at addonspresta.com and upload them like a new module. Your settings and the price history are kept.
Support is included for 12 months from your order: write to mail@addonspresta.com or use the contact form at addonspresta.com (Monday to Friday, 10:00–16:00 CET; we usually answer within 2 business days). Please include your PrestaShop version, the module version and the steps that lead to the problem.