Skip to main content

[Magento] Integration guide for Magento 2

Install ReferralCandy on your Magento 2 store

Written by Adam

This article applies if you run your store on Magento 2 and install the ReferralCandy module via Composer.

Merchants on the Magento version 2.0 and above who are able to install modules via Composer can integrate ReferralCandy with their Magento store. If this procedure doesn't work for you, try email integration.


Set up Magento integration

Note: Third-party checkout extensions in your store may interfere with referral detection. It's recommended to use the standard Magento checkout process when integrating with ReferralCandy.

Step 1: Server-side setup

To install the ReferralCandy module via Composer:

  1. Install the referralcandy/magento2-module-integration package from Composer:

    composer require referralcandy/magento2-module-integration
  2. Update your project's Composer dependencies:

    composer update
  3. Enable the module using the magento-cli:

    bin/magento module:enable ReferralCandy_Integration
  4. Perform a setup upgrade:

    bin/magento setup:upgrade
  5. Run the code compiler for Magento:

    bin/magento setup:di:compile
  6. Flush your store's cache (recommended by Magento after module installations)

    bin/magento cache:flush

Step 2: Admin dashboard setup

After ReferralCandy installation via Composer, configure the module:

  1. Log in to your Magento store's admin panel.

  2. Navigate to STORES and click Configuration.

  3. On the configuration page, a new section called REFERRALCANDY should be available. Navigate to REFERRALCANDY and click General.

  4. On the ReferralCandy dashboard, go to Account > Profile > API Tokens to find your API Access ID and API Secret ID. Copy both values.

  5. Go back to the configuration page and paste the values in: your API Access ID goes into both the APP ID and API Access ID fields (they take the same value), and your API Secret ID goes into the API Secret Key field.

  6. Enable the module and click Save Config.

Make a test purchase in your store to ensure that referral detection works. Go to your Purchases & Referrals page to verify if purchases are tracked successfully.

Did this answer your question?