Magento 2 Price Checking Module Created by Jared Melkun
This module adds three fields to products:
- competitor_url - Used to get the URL of a competing product
- price_snippet - A string containing a regex for extracting the price
- competitor_price - Used to store the price of a competitor's product
By using this construct, we can automate getting the prices of competitors, allowing us to know in real time when we've been undercut so we can update our pricing.
To use this module, add the module to the app/code folder of your magento installation. Before installing the module, you will need to create an API for fetching the data you will need, and put the URL of the API in the Jared/PriceChecker/Model/PriceChecker.php file, then run the following commands:
- bin/magento setup:upgrade
- bin/magento setup:di:compile
- bin/magento setup:static-content:deploy
With the module installed, each product will have the fields we talked about earlier added, and the ability to compare and get competitors pricing built into the backend menu.
This code follows the MIT License, and there is no warranty (implied or otherwise). Do not bother me with your problems; issues will be fixed if they are relevant to me and I deem them worth correcting.