What this solution does
The module records price changes for products and offers, displaying the dynamics as charts within the product card in the Bitrix administration panel. No public components are provided.
Settings are located at: Settings → Product Settings → Module Settings → Price History Tracker (or via the menu: Settings → Price History → Settings).
Global module activation: when disabled, database triggers are removed, history logging stops, and the corresponding tab is hidden from the product card.
History retention period: records are stored in the database for a duration ranging from 30 to 3650 days. Old records can be removed using the cleanup service.
Database trigger status: an informational read-only field indicating the current state.
Price types to track: a list of all catalog price types with selection options. Only the selected types are recorded and displayed on the chart. The list is synchronized with the database to ensure proper trigger functionality.
Trigger operation modes:
- MySQL Triggers: capture all changes to the price table, including actions performed in the admin panel, data exchange processes, and direct SQL queries if permissions allow.
- Event Mode: data is recorded via catalog change events (admin panel and catalog API). Direct SQL exchanges may not be captured in the history under this mode.
- Disabled: the module is globally turned off or no price types have been selected for tracking.
The EcomLabs Price History Tracker module updates the database table after settings are saved. The system automatically selects between trigger mode and event mode. If the user lacks CREATE TRIGGER permission or if the binary log is enabled without the log_bin_trust_function_creators parameter, event mode is activated.
The module interface is built around settings and tabs within product cards. The settings section includes on/off switches, retention period parameters, price type selection, and a status indicator for the recording mode. The administrative menu path is: Settings → Price History → Settings. There are no separate report or list items in the administrative panel.
In a product card (information base element or catalog item), the Price History tab displays graphs for each tracked price type. For a trade offer (SKU), the same tab shows the price history for that specific offer, where PRODUCT_ID corresponds to the offer ID. In a product card containing multiple trade offers, a list is displayed with checkboxes for selection. Buttons for Select All and Show Graphs are available. By default, up to five offers are shown. Each offer has a separate graph where the offer name is paired with the price type.
Trigger mode operates only if the MySQL environment allows CREATE TRIGGER. In this mode, AFTER INSERT and AFTER UPDATE triggers are created for the b_catalog_price table. A record is written to the b_ecl_price_history table only if the CATALOG_GROUP_ID exists in the b_ecl_price_history_watch table.
History records are updated only upon actual changes to the price, currency, or price type.
In event mode (fallback), the OnPriceAdd and OnPriceUpdate handlers invoke HistoryService::recordIfChanged(), which prevents duplicate entries for identical prices.
Display
When a product and its tab are opened, a series of chart data points is loaded. If the history is empty, the current price may be recorded as a seed value. The chart is rendered only upon tab activation, not while the tab is hidden. The container width is fixed to prevent AmCharts from distorting the page layout.
For “Price History Tracker (EcomLabs)”, General iT can perform integration, configuration and a final check after installation.