Child pages
  • Who Viewed This Also Viewed - Magento 2
Skip to end of metadata
Go to start of metadata



Firefox user notice:

Please use different web browser to view this document.

Sorry for the inconvenience.

Magento 2 Who Viewed This Also Viewed enhances promotional opportunities for web merchants by adding commonly viewed together item blocks on product pages. With the extension, store admins can configure the related product block's position, layout, product suggestion logic (products from one category only or from different categories, upsells only or cross-sells only), etc.

Compatibility: Magento Open Source 2.1.X - 2.3.X, Magento Commerce 2.1.X - 2.3.X

Product Page

Thank you for choosing Aheadworks!

Installing Who Viewed This Also Viewed

Command Line Installation

1. Backup your web directory and store database

2. Download the Who Viewed This Also Viewed installation package

 3. Upload the contents of the Who Viewed This Also Viewed installation package to your store root directory

 4. In the SSH console of your server, navigate to your store root folder:

cd path_to_the_store_root_folder

run the following command:

php -f bin/magento module:enable Aheadworks_Wvtav


php -f bin/magento setup:upgrade


php -f bin/magento setup:static-content:deploy

5. Flush the store cache; log out from the backend and log in again


Make sure the installation is done from under the FTP administrator account. Otherwise make sure to set 775 permissions to the store root directory after the extension is deployed.

Composer Installation

1. Log in to your customer account at and navigate to Account -> Composer access;

2. Configure your store to work with the Aheadworks composer repository:

Add composer repository to composer.json by running:

composer config repositories.aheadworks composer in the Magento installation root.

Use the provided key pair as a login and pass. You can optionally save them in the global composer auth file.

 3. You can start using AW composer now.

 For extension names, navigate to Account -> Composer access.

 4. Open the root Magento directory on your server and send Composer the following command:

composer require <component-name>:<version>

Note: Use the previously copied component name and version.

 5. Make sure that Composer finished the installation without errors. Flush the store cache, log out, and log into the backend again.


The Who Viewed This Also Viewed extension requires cron daemon setup and running.

Every time cron launches, customer sessions are analyzed for the most frequently viewed products. Based on this data, the module then automatically composes relevant product lists as recommendations.

Set up cron

If you have already configured cron jobs for your Magento installation then you can skip this step. Read the following instructions on setting cron job for your Magento store: Magento user guide.

Generally it would be enough to run in SSH console of your server: 



And insert the following line:  



Don't forget to confirm saving request when exit.

Introducing Who Viewed This Also Viewed

The Who Viewed This Also Viewed (WVTAV) extension places a related product block on product pages with the most frequently viewed items. The module is equipped with the following key features:

  • Product suggestions are composed automatically based on the users' viewing behavior;
  • The grid and slider block layout types are supported;
  • Blocks can be put in one of the eight predefined positions of a product page;
  • Products from either one category or multiple categories can be promoted;
  • An admin can show upsells or cross-sells as related purchases.

Extension Logic

In the backend, the module is presented as a single configuration page. Having configured the user product viewing tracking period and the related product block's look and working logic, the admin can see the block in action. On the storefront, the block is located on the previously defined product page's position. It is presented either as a grid or a slider (based on the admin's preferences) and displays either upsells or cross-sells (again, depending on the admin's configuration).

The extension works on a customer-session basis. It analyzes all products viewed by customers during their visit to the store. More specifically:

  • The path for both registered and guest customers is considered;
  • Customer sessions are stored in the Magento DB tables;
  • Complete customer sessions are analyzed with every cron launch (Aheadworks leaves the cron settings at your discretion).

The customer session lifetime value is calculated by the following formula:

The time the customer left the store - the time customer visited the store + 30 minutes = The session lifetime.


Getting Around

The Magento 2 Who Viewed This Also Viewed (WVTAV) extension adds the related product block to product pages. Product lists for the block are composed automatically depending on the product the corresponding list is related to.

The block can be presented in two formats: slider and grid. Here's how the slider block looks like:

Related Product Block (Slider)

The grid block looks in the following way:

Related Product Block (Grid)

The extension builds its related product block depending on the most common customer navigation path and tendencies when browsing a catalog. Once installed, the extension is activated by default. It starts analyzing customer sessions after the first cron launch.

The Who Viewed This Also Viewed blocks are placed on all product pages simultaneously. However, you can configure the block's position and content conditions in the extension settings.

Extension Settings

The Who Viewed This Also Viewed extension settings are located under Stores > Configuration > AHEADWORKS EXTENSIONS > Who Viewed This Also Viewed.

Extension Settings Page

The settings cover the following parameters:

  • Process sessions for the last X days - defines for how long customer browsing history should be tracked by the module;
  • Block Position - selects the extension's block position;
  • Block Name - defines the block's title (visible to customers);
  • Block Layout - adjusts the block's layout: slider or grid; for the grid layout, a store administrator need to specify the number of rows;
  • Suggest Products from One Category Only - defines if the products in the block should match the category of the currently viewed product;
  • Suggest Product Only with price Higher than Price of Current Product - defines if the extension's block should feature upsells only.

Uninstalling Who Viewed This Also Viewed

Manual Removal

1. Disable the module by executing the following commands:

php bin/magento module:disable Aheadworks_Wvtav
php bin/magento setup:upgrade

2. Remove the extension files from the following folder:


Automatic Removal (via Composer)

1. Disable the module by executing the following commands:

php bin/magento module:uninstall Aheadworks_Wvtav


Product Page

Need Customization?

Magento 2 Custom Development Services by Aheadworks

You can always find the latest version of the software, full documentation, demos, screenshots, and reviews on
License agreement:
Contact Us:
Copyright © 2019 Aheadworks Co.

  • No labels