Skip to main content

Installing the extension

Use these steps to install the extension on your store.

Prepare for installation

  1. Back up your store's database and web directory.
  2. Log in to the SSH console of your server and navigate to the root directory of your Magento 2 store.
  3. Copy the installation instructions from the My Downloadable Products page and paste them into the SSH console. Press ENTER to proceed.

Execute the following commands to install the extension

  1. Run the following command to enable the extension:

    php -f bin/magento module:enable Mirasvit_Core Mirasvit_Report Mirasvit_Rewards Mirasvit_RewardsAdminUi Mirasvit_RewardsApi Mirasvit_RewardsBehavior Mirasvit_RewardsCatalog Mirasvit_RewardsCheckout Mirasvit_RewardsCustomerAccount
  2. Run the following command to install the extension:

    php -f bin/magento setup:upgrade
  3. Clear the cache:

    php -f bin/magento cache:clean
  4. Deploy static view files:

    rm -rf pub/static/*; rm -rf var/view_preprocessed/*;
    php -f bin/magento setup:static-content:deploy

Execute the following commands to install Rewards GraphQL module

  1. Install the Rewards GraphQL module with the command:

    composer require mirasvit/module-rewards-graph-ql:*
  2. Run the following command to enable the extension:

    php -f bin/magento module:enable Mirasvit_RewardsGraphQl
  3. Run the following command to install the extension:

    php -f bin/magento setup:upgrade
  4. Clear the cache:

    php -f bin/magento cache:clean
  5. Deploy static view files:

    rm -rf pub/static/*; rm -rf var/view_preprocessed/*;
    php -f bin/magento setup:static-content:deploy

If you are using the Hyvä theme, install the compatibility module

  1. Install the Hyvä compatibility module with the command:

    composer require mirasvit/module-rewards-hyva:*
  2. Enable the installed Hyvä modules:

    bin/magento module:enable Hyva_MirasvitRewards Hyva_MirasvitRewardsBehavior Hyva_MirasvitRewardsCatalog Hyva_MirasvitRewardsCheckout Hyva_MirasvitRewardsCustomerAccount
  3. Update the Magento database schema and data:

    bin/magento setup:upgrade
  4. Compile the code for the installed extensions:

    bin/magento setup:di:compile
  5. Compile theme assets:

    cd /path/to/theme/web/tailwind/
    npm run build-prod
  6. Deploy static view files:

    cd /path/to/project/
    rm -rf pub/static/*; rm -rf var/view_preprocessed/*;
    php -f bin/magento setup:static-content:deploy
  7. Flush the cache:

    bin/magento cache:flush
Note

To view Reward Points on product view page the file Magento_Catalog/templates/product/view/price.phtml should be modified:

Insert the following code before the last closing div tag

<?php if ($rewardsBlock = $block->getChildBlock('product.price.final')) { echo $rewardsBlock->toHtml(); } ?>

If you want to upgrade the extension, please refer to the How to upgrade the extension section. To temporarily disable or remove it, use the commands from the How to disable the extension section.