Who Bought This Also Bought - Magento 2

Firefox user notice:

Please use another web browser to view this document.

Sorry for the inconvenience.


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.3.X, Magento Commerce 2.3.X

Product Page

Thank you for choosing Aheadworks!

Installing Who Bought This Also Bought

Command Line InstallationComposer Installation

1. Backup your web directory and store database

2. Download the Who Bought This Also Bought installation package

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

 4. In 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 store cache; log out from the backend and log in again

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

If you are installing an extension from Aheadworks for the first time, you need to add our composer repository to your Magento store:

1. Login to your ssh console and navigate to your store folder:

cd path_to_the_store_root_folder

Run the following command:

composer config repositories.aheadworks composer https://dist.aheadworks.com/

On successful execution of the command you will be able to use the composer to install the extensions.

To install the extension:

2. Login to your ssh console and navigate to your store folder:

cd path_to_the_store_root_folder

 3. Run the following command to install the latest version of the extension:

composer require aheadworks/module-wbtab

if you need to install a specific version, run this command:

composer require aheadworks/module-wbtab:<version>

Specify the version of the extension in <version>

When prompted, enter Public Key (Username) and Private Key (Password):

Both Public Key (Username) and Private Key (Password) can be found in My Projects and Licenses in your personal account on our site:

4. Enable the extension:

php -f bin/magento module:enable <Module_Name>

Add the product name in <Module_Name>

Next, register the extension:

bin/magento setup:upgrade

Recompile your Magento store if you are in the Production mode:

bin/magento setup:di:compile

To verify that the extension is enabled, run this command:

bin/magento module:status

Clean store cache, by running the following command:

bin/magento cache:clean

Log out and Log in the backend again.

To upgrade the extension:

5. To update or upgrade an extension:

Download the updated extension file. Take note of the module-name and version. Export the contents to your Magento root.

If a composer package exists for the extension, run one of the following.

Update per module name:
composer update aheadworks/module-wbtab
Updater per version:
composer require aheadworks/module-wbtab:<version>

Run the following commands to upgrade, deploy, and clean the cache.

php bin/magento setup:upgrade --keep-generated
php bin/magento setup:static-content:deploy
php bin/magento cache:clean

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

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

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.

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.

  • 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

Product Page

Need Customization?

You can always find the latest version of the software, full documentation, demos, screenshots, and reviews on http://aheadworks.com
License agreement: https://aheadworks.com/end-user-license-agreement
Contact Us: https://aheadworks.com/contact
Copyright © 2021 Aheadworks Co. http://www.aheadworks.com