Firefox user notice:

Please use different web browser to view this document.

Sorry for the inconvenience.

Who Bought This Also Bought - Magento 2

Magento 2 Who Bought This Also Bought analyzes the shopping activity of customers and then offers frequently bought together items as additional purchases. Store owners can precisely set up a related item block in terms of its position, layout, the maximum number of products to be shown as well as individually configure the block for catalog, product, and cart pages. 

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

Thank you for choosing Aheadworks!

Installing Who Bought This Also Bought

Command Line Installation

1. Backup your web directory and store database

2. Download the Who Bought This Also Bought installation package

 3. Upload the contents of the Who Bought This Also Bought 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_Wbtab


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 the 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.

Introducing Who Bought This Also Bought

Extension Logic

The Who Bought This Also Bought (WBTAB) module introduces an easy and convenient way of the related product block configuration. Its key features include:

  • Automatic product offers based on the top purchased-together items;
  • The related product block can be placed on the product, category, and cart pages;
  • Five on-page block position options
  • Per-row and slider block presentation options.

The extension analyzes all the orders placed focusing on the ones with two or more products purchased together. Based on the customer's tendency to purchase particular products in a single order, the extension builds related product lists accordingly.

For example, if your customers purchased cameras with spare batteries and leather cases, the extension will display batteries and leather cases as related products on the camera page.

The WBTAB module considers only 'Complete' orders when building related product blocks.

For category and cart pages, the WBTAB block works in a different way. It takes the first item a customer added to the cart and displays the related offers for it. If the customer has no items in the cart, the WBTAB block is not displayed.

Getting Around

The Magento 2 Who Bought This Also Bought extension adds the related product block to product and category pages. The block's content is composed automatically based on the customers' purchasing behavior.

Related Product Block on the Storefront

By default, the extension puts the related product block on the product, category, and cart pages. By integrating the module with the AJAX Cart Pro extension, you will be able to show your related offers in the confirmation popup provided by Ajax Cart Pro.

AJAX Cart Pro Integration

Adjusting Extension Settings

The Who Bought This Also Bought extension comes set up and ready for work right after the installation. If required, you can view and alter the extension settings under Stores > Configuration > AHEADWORKS EXTENSIONS > Who Bought This Also Bought.

The extension settings are represented by the three sections: Block at Product Page, Block at Category Page and Block at Cart Page. The settings are almost similar for all sections. The only difference is that the 'Block at Cart Page' section doesn't have the 'Max Products to Display' option. This way, you can configure the related product block separately for each page type.

Extension Settings

  • Display Block at Product Page - enables/disables the WBTAB block on the page;
  • Block Name - sets the block's name;
  • Block Position - defines the block's position on the page:
    • Instead of native Related Products block;
    • Before native Related Products block;
    • After native Related Products block;
    • Content top;
    • Content bottom.
  • Block Layout - defines how the items are represented in the block:
    • Products aligned in single row;
    • Products aligned in multiple rows;
    • Slider.
  • Max Products to Display - defines how many products should be displayed in the block;
  • Display "Add to Cart" button - enables/disables the "Add to Cart" button for the items in the WBTAB block.

Uninstalling Who Bought This Also Bought

Manual Removal

1. Disable the module by executing the following commands:

php bin/magento module:disable Aheadworks_Wbtab
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_Wbtab

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.