Getting Started

Welcome to the Automatic Related Products Documentation. Whether you are a new or an advanced user, you can find some useful information here.

First of all, we recommend to check the following link:

How to install the extension

  1. Backup your store's database and web directory.
  2. Login to the SSH console of your server and navigate to the root directory of the Magento 2 store.
  3. Copy the installation instructions from the page My Downloadable Products to the SSH console and press ENTER.
  4. Run command php -f bin/magento module:enable Mirasvit_Core Mirasvit_Related to enable the extension.
  5. Run command php -f bin/magento setup:upgrade to install the extension.
  6. Run command php -f bin/magento cache:clean to clean the cache.
  7. Deploy static view files

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

  8. Run command php -f bin/magento indexer:reindex mst_related_index to reindex extension-related data.

  9. Make sure that the native Magento cronjob is configured and working correctly. The extension runs all tasks in cron.

Product Selection Rules

Selection Rule - internal functionality that describes conditions for select appropriate related products.

Go to Marketing > Related Products > Product Selection Rules. You will see the available rules.

You can add a Rule by pressing Add New Rule button. You will see then a Rule edit form, which contains basic data:

General information

  • Internal Name - internal name of the rule.

Products Selection Condition

  • Primary Source - the source of related products. The extension selects related products based on:

    • Whole Catalog - all available products (M and R aren't related)
    • Bought Together (the same Order) - previous orders (M and R were bought in the same order)
    • Also Bought (the same Customer) - previous orders (M and R were bought by the same customer)
    • Also Bought (the same Customer) - visits history (M and R were viewed by the same customer)

    Note

    Product M - product based on page:

    • Product View page - current product
    • Shopping Cart page - last added product to the cart
    • Customer Account pages - any of already purchased products

    Product R - possible related product

  • Rule - additional rules to select related products

Product Blocks

Product Block - a block that displays related products on the store pages.

Go to Marketing > Related Products > Product Blocks. You will see available blocks.

You can add a Block by pressing Add New Block button. You will see then a Block edit form, which contains basic data:

General information

  • Internal Name - internal name of the block
  • Active - to enable/disable block
  • Priority - priority of the block. If a few blocks share the same position on the page, the extension will select the one block with the highest priority.
  • Store View

Where To Display

This section defines the page and position to display the block.

After changing the position or create a block, you should clear the Magento cache for apply changes.

What To Display

This section defines what products should be added to the block, based on configured Product Selection Rules.

How To Display

This section defines general appearance rules: Block title, number of products, etc.

How to upgrade extension

To upgrade the extension, follow these steps:

  1. Backup your store's database and web directory.
  2. Login to the SSH console of your server and navigate to the root directory of the Magento 2 store.
  3. Run command composer require mirasvit/module-related:* --update-with-dependencies to update current extension with all dependencies.

    Note

    In some cases, the command above is not applicable, it's not possible to update just the current module, or you just need to upgrade all Mirasvit modules in a bundle. In this case, the command above will have no effect.

    Run instead composer update mirasvit/* command. It will update all Mirasvit modules installed in your store.

  4. Run command php -f bin/magento module:enable Mirasvit_Core Mirasvit_Related to enable the extension.
  5. Run command php -f bin/magento setup:upgrade to install updates.
  6. Run command php -f bin/magento cache:clean to clean the cache.
  7. Deploy static view files

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

  8. Run command php -f bin/magento indexer:reindex mst_related_index to reindex extension related data.

Disabling the Extension

Temporarily Disable

To temporarily disable the extension please follow these steps:

  1. Login to the SSH console of your server and navigate to the root directory of the Magento 2 store.
  2. Run command php -f bin/magento module:disable Mirsvit_Related to disable the extension.
  3. Log in to the Magento backend and refresh the store cache (if enabled).

Removing the Extension

To uninstall the extension, please follow these steps:

  1. Login to the SSH console of your server and navigate to the root directory of the Magento 2 store.
  2. Run the command composer remove mirasvit/module-related to remove the extension.
  3. Log in to the Magento backend and refresh the store cache (if enabled).

Change Log

1.0.8

(2020-07-30)

Features

  • Added GraphQL implementation

Improvements

  • Support of Magento 2.4
  • Selection rules for non-product pages

1.0.7

(2020-07-28)

Improvements

  • Selection rules for non-product pages

1.0.6

(2020-07-16)

Improvements

  • Bulletproof template
  • Added GraphQL implementation

1.0.4

(2020-02-28)

Improvements

  • Order products

1.0.3

(2020-02-25)

Improvements

  • Apply filter by stock (by default only saleable products are suggested)

1.0.2

(2020-02-20)

Improvements

  • Ability to use custom block position
  • Indexation performance

1.0.1

(2020-02-11)

Fixed

  • Minor fixes

1.0.0

(2020-02-06)

Improvements

  • Indexation performance

0.0.1

(2020-01-22)

Improvements

  • Initial release