Price Tracker for M2

Introduction


The extension monitors (tracks) all price changes and promotions in the store. Based on this data (if the product is on sale), it shows its lowest price on the site for the last 30 days from:

  • the day the promotion was enabled for products older than 30 days
  • the date of its creation for products that are in the offer for a shorter period of time

 

Installation


composer require 4mage/m2-price-tracker

Copy the downloaded files to the directory

app/code

Then install the module in Magento

php bin/magento setup:upgrade

Run the following command lines

php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy

Configuration


Enable the module

After enabling the module in the store configuration, run the command

php bin/magento price-tracker:reset

Delete module data

The module allows you to delete the entire price history

php bin/magento price-tracker:truncate-tables 

Show prices for groups

Remove prices

The module allows to enable the removal of prices that have been collected

Configurable products

For configurable products, by default, the lowest price is shown when the option is selected, the module allows to show the lowest price among all simple/virtual products that are on sale when options are not selected.

Magento 2.2


The module was tested on version 2.2.11 and php 7.1

 

< 2.6.0

  • apply the patch e.g. using composer and apply the patch to version 2.3

 

>= 2.6.0 

  • apply the patch e.g. using composer

 

>= 2.8.2 

  • apply the patch e.g. using composer

Magento 2.3


For the module to work in this version, you need to overwrite the files in the current theme:

app/design/frontend/current/theme

 

< 2.6.0

 

>= 2.6.0 

 

>= 2.8.2 

  • apply the patch e.g. using composer

Composer patch installation


composer require cweagans/composer-patches

    "extra": {
        "magento-force": "override",
        "patches": {
            "4mage/m2-price-tracker": {
                "2.3-patch": "https://4mage.co/pt/2.2-3_fix.patch"
            }
        }
    }

Configurable products


Default view

With the option to show the lowest price enabled with no options selected

When product option is selected, if the product is on sale

Its lowest price will be displayed

When product option is selected, if the product is not on sale

the block with the lowest price will be hidden

Automatic option selection

Magento allows to select product options via url, in which case the lowest price will automatically be shown or the entire block will be hidden

Bundle products


Bundle products require to set the start date of the promotion for special prices, without it 30 days from the date of the promotion will be counted from today's date.

For products that are on offer for less than 30 days, the start of the promotion, as in other types of products, is counted from the date of its creation:

Grouped products


Cart price rules


When the option in rule is enabled, the lowest price will be visible for products that meet its conditions.

 

 

Product price history


The module adds a tab to edit the product in the administration panel, which shows how the price of the product has changed over time. The final price is used to display the lowest price

In the module configuration it is possible to disable it

 

API


REST API

 

{
  "price": 0,
  "currency": "string",
  "price_info_text": "string",
  "tax_price_info_text": "string",
  "show_for_current_customer_group": true,
  "configurable_hide_min_price": true,
  "configurable_used": [
    {
      "product_id": 0,
      "price": 0,
      "price_info_text": "string"
    }
  ]
}

GraphQl

Module installation

composer require 4mage/m2-price-tracker-graph-ql
query {
    priceTrackerMinPrice (
       sku: "WH12",
       customerGroupId: 0
    ) {
       price,
       currency,
       price_info_text,
       tax_price_info_text,
       show_for_current_customer_group,
       configurable_hide_min_price,
       configurable_used {
          product_id,
          price,
          price_info_text
       }
    }
}

Hyvä


composer require hyva-themes/magento2-4mage-price-tracker

FAQ


Yes, the module shows prices in the currently selected currency
Yes, the module works with multiple stores
Yes, the module works with prices set globally and independently per site
In this configuration, the lowest price is shown with tax
Yes, the module supports REST API and GraphQl

Changelog


v2.8.5

Added an option to enable the restriction of data collection by the module. Option for stores where not all or any customer groups don't have individual prices

v2.8.4

Fixed adding new products that had promotions enabled by a special price or catalog rule when added to the store

v2.8.1

Added an option to show the lowest and normal price of a product in the cart after adding a product that is on sale. Doesn't apply to products discounted by cart rule that show the lowest price regardless

v2.8.0

Added an option to enable the lowest price from the last 30 days for products that are not on sale

v2.7.1

Added the ability to delete prices from the history on the product edit page

v2.7.0

Improved showing the lowest price in product lists (categories, search results, widgets)
Added compatibility with Hyvä theme - hyva-themes/magento2-4mage-price-tracker

v2.6.4

Added Magento 2.4.6 compatibility

v2.6.0

Added showing the lowest price in the product list and search results in the form of text or tooltip

v2.5.0

Added support for grouped products

v2.4.0

Added support for bundle products

v2.3.2

Fixed price display for products that are offered for less than 30 days

v2.3.1

Fixed price display for configurable products

v2.3.0

Added support for cart price rules

v2.0.0

Adding REST API and additional module with GraphQl

v1.1.0

Improved support for configurable products

v1.0.4

Add a command to delete module data

v1.0.0

Initial release