Omnibus, Price History and Anchor Price icon

Omnibus, Price History and Anchor Price

Plugin screenshot thumbnail 1/6
Plugin screenshot thumbnail 2/6
Plugin screenshot thumbnail 3/6
Plugin screenshot thumbnail 4/6
Plugin screenshot thumbnail 5/6
Plugin screenshot thumbnail 6/6

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/publish writes today's CSV and XML, prunes old files and rebuilds the index.
  • price-list/preview prints 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.

Installation Instructions

To install this plugin, copy the command above to your terminal.

Reviews

This plugin doesn't have any reviews.

Active Installs
0
Version
1.1.3
License
MIT
Compatibility
Craft 5
Last release
September 20, 2026
Categories