Omnibus, Price History and Anchor Price
Price history per variant, plus the reference prices EU and Croatian law require next to a selling price.
What it does
- Lowest price in the 30 days before a reduction (Directive (EU) 2019/2161, the "Omnibus" directive; in Croatia, Consumer Protection Act art. 19). Shown while an item sells below its regular price. The reduced price itself never counts as its own reference.
- Anchor price ("sidrena cijena" or "dodatna cijena", Official Gazette NN 101/2026, in force 1 October 2026): the price applicable on the reference day, 10 September 2026, shown next to every selling price. Products listed later carry their first price with its date.
- Daily price list (Decision on publishing price lists, NN 101/2026): CSV and XML with the prescribed columns and file name, published on the site and kept for 30 days. One console command, run from cron.
Twig
{% set anchor = craft.productPriceHistory.anchor(variant) %}
{% if anchor %}
{{ craft.productPriceHistory.anchorLabel() }} {{ anchor.price|commerceCurrency(currency) }} ({{ anchor.date|date('j. n. Y.') }})
{% endif %}
{% if variant.salePrice < variant.basePrice %}
Lowest price in the 30 days before the reduction: {{ craft.productPriceHistory.lowestBefore(variant)|commerceCurrency(currency) }}
{% endif %}
anchor() accepts a variant, a product (its default variant) or an id. lowestBefore() closes the window when the current price was recorded, so the reduced price is excluded.
Settings
Reference day, label, lowest-price window, store identity for the price-list file name, publish directory and public index route, retention, CSV delimiter, and the field handles for brand, barcode and unit of measure. Croatian control-panel translations are included.
Console
anchor/backfill [--as-of=Y-m-d]records the current price for variants with no history, for stores that install after the reference day.anchor/show <variantId>prints the anchor and the lowest price.price-list/publishwrites today's CSV and XML, prunes old files and rebuilds the index.price-list/previewprints the rows without writing anything.
Requirements
Craft CMS 5.0+, Craft Commerce 5.0+, PHP 8.2+.
The plugin implements the rules as published; it is not legal advice.
To install this plugin, copy the command above to your terminal.
This plugin doesn't have any reviews.





