Follow these steps to install the ProfitMetrics module in Magento 2
Additional Magento Resources:
How to Activate Headless Mode in Magento 2
Part 2: Installation with Composer
Part 3: Installation with the module package
Part 1: Download Module
-
Navigate to https://my.profitmetrics.io/customer/integrations_magento2.php
- Download the current version of the module
Part 2: Installation with composer
# In this example the magento 2 root is /var/www/magento2
$ cd /var/www/magento2/ $ composer config repositories.profitmetrics git https://pmgitforcomposer:9879c5c826b87d70075aea17bbde8b7965670614@github.com/Profitmetrics-io/profitmetrics-m2
$ composer require dv/profit-metrics
$ bin/magento setup:upgrade
$ bin/magento setup:di:compile
# Replace en_US with locales, used on Magento instance, Magento/luma with the theme used:
$ bin/magento setup:static-content:deploy en_US-f-a frontend--theme Magento/luma--jobs=4
$ bin/magento setup:static-content:deploy en_US-f-a adminhtml--jobs=4
$ bin/magento deploy:mode:set production--skip-compilation
$ bin/magento cache:enable
$ bin/magento cache:clean
$ bin/magento cache:flush
Part 3: Installation with the module package
- Connect to the Magento 2 server using any FTP client (FileZilla, etc).
- Upload the module to the Magento 2 root folder. The app/code/DV/ProfitMetrics folder should appear.
- Connect to the Magento 2 server using an SSH client (Putty, etc).
- Run the following commands from the console:
$ bin/magento deploy:mode:set default
$ bin/magento setup:upgrade
$ bin/magento setup:di:compile
# Replace en_US with locales, used on Magento instance, Magento/luma with the theme used:
$ bin/magento setup:static-content:deploy en_US-f-a frontend--theme Magento/luma--jobs=4
$ bin/magento setup:static-content:deploy en_US-f-a adminhtml--jobs=4
$ bin/magento deploy:mode:set production--skip-compilation
$ bin/magento cache:enable
$ bin/magento cache:clean
$ bin/magento cache:flush
Part 4: Configuration
- Open the Magento 2 admin panel.
- Goto: Stores-> Configuration. Click on the DV EXTENSIONS tab, then click on ProfitMetrics.
- Configure ProfitMetrics in the General tab:
-
Enable Is module enabled Store Public ID Store ID from ProfitMetrics > Websites Source for the configurable products price There are two options for configurable price determination:
1) get from the configurable product
2) retrieve the minimal price of related simple optionsPrice Buy Attribute Code Attribute code for price_buy
There is a default attribute created by this module called 'price_buy'Secret Code This code is required to secure access to feed data. Please generate the random value, save, and click generate Generate Random Secret Code This button will generate a random Secret Code for the field above Feed Filename Feeds are stored in the server in the path var/profitmetrics/products_.xml, where is the store code and is accessible by the URL:
file path: magento_root/var/profitmetrics/products_default.xml
URL: https://magento-2.com/profitmetrics/feed/index/code/0z8zpifbg2a04oo6wj0h/store/1
Please select the specific file name in your store scope in order to modify the feed name for a specific store. Please find below the link to ProfitMetrics feed for the necessary store. The link should contain the correct secret code (please check the parameter value above). Please provide this link to ProfitMetrics team for products data synchronization.Generate Feed Now This button will generate a feed Order Statuses to send to ProfitMetrics This option allows selection of order statuses to send to ProfitMetrics "Send Orders Now" button This button allows sending order data to ProfitMetrics immediately "Script to include on all pages except for order confirmation" field Allows input of script to any page except Order Confirmation. Typically used for GA4 script - Configure ProfitMetrics in the Cron tab
- After configuration, go to System-> Cache Management-> Flush Magento Cache