Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.



...

width50%

Table of Contents

Warning

Firefox user notice:

Please use another web browser to view this document.

Sorry for the inconvenience.

...

width30%

                                                                                                                                                                                                   

Image Modified

Magento 2 Automatic Related Products adds related product blocks to website pages. Products in blocks are displayed in accordance with specific rules regarding block position, name, priority, the pages where the block should be shown, the items to be included in it, the block's look. Automatic product suggestions can be disabled for individual products.

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

Product Page

Thank you for choosing Aheadworks!

Installing M2 Automatic Related Products

...

Panel
borderWidth2px
borderStylesolid

1. Backup your web directory and store database

Panel
borderWidth2px
borderStylesolid

2. Download the Automatic Related Products installation package

Panel
borderWidth2px
borderStylesolid

 3. Upload contents of the Automatic Related Products installation package to your store root directory

...

borderWidth2px
borderStylesolid

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

No Format
cd path_to_the_store_root_folder

run the following command: :

No Format
php -f bin/magento module:enable Aheadworks_Autorelated

then:

No Format
php -f bin/magento setup:upgrade

after:

No Format
php -f bin/magento setup:static-content:deploy
Panel
borderWidth2px
borderStylesolid

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

Note

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.

...

width50%

...

borderWidth2px
borderStylesolid

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

Panel
borderWidth2px
borderStylesolid

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

Panel
borderWidth2px
borderStylesolid
cd path_to_the_store_root_folder

Run the following command:

Panel
borderWidth2px
borderStylesolid
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.

...

borderWidth2px
borderStylesolid

To install the extension:

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

Panel
borderWidth2px
borderStylesolid
cd path_to_the_store_root_folder

...

borderWidth2px
borderStylesolid

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

Panel
borderWidth2px
borderStylesolid
composer require aheadworks/module-automatic-related-products

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

Panel
borderWidth2px
borderStylesolid
composer require aheadworks/module-automatic-related-products:<version>
Tip

Specify the version of the extension in <version>

Panel
borderWidth2px
borderStylesolid

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

Note

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

Image Removed

...

borderWidth2px
borderStylesolid

4. Enable the extension:

Panel
borderWidth2px
borderStylesolid
php -f bin/magento module:enable <Module_Name>
Tip

Add the product name in <Module_Name>

Next, register the extension:

Panel
borderWidth2px
borderStylesolid
bin/magento setup:upgrade

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

Panel
borderWidth2px
borderStylesolid
bin/magento setup:di:compile

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

Panel
borderWidth2px
borderStylesolid
bin/magento module:status

Clean store cache, by running the following command:

Panel
borderWidth2px
borderStylesolid
bin/magento cache:clean

Log out and Log in the backend again.

...

borderWidth2px
borderStylesolid

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.

Code Block
titleUpdate per module name:
composer update aheadworks/module-automatic-related-products
Code Block
titleUpdater per version:
composer require aheadworks/module-automatic-related-products:<version>

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

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

Introducing M2 Automatic Related Products

Section

The Automatic Related Products (ARP) module introduces a powerful set of features to manage related product offers:

  • Flexible rules quickly define which items to display as related and on which pages to display a related product block itself;
  • Rule overriding with the native Magento related products (for individual products);
  • Custom block on-page position;
  • Grid (per-row) and slider block layout options.
  • Integration with Customer Segmentation (v. 1.1.0 or newer)

Getting Around

...

The Automatic Related Productsextension comes ready for work right after the installation.

Manage Rules

...

Image Removed

...

Here you are provided with rule short descriptions and performance stats:

  • Views - displays the number of customer visits to the pages with the ARP block;
  • Clicks - displays the number of clicks on the products displayed in the ARP block (both product clicks and add to cart actions are counted);
  • CTR (Click-through rate) - represents the View-to-Click ratio.

If you already have one or several rules created, this section provides the following opportunities:

  • Image Removed navigates you to the 'New Rule' screen where you are suggested to create new related product rules;
  • Clicking a rule name navigates you to the 'Edit Rule' page where you can adjust the created rule settings;
  • Image Removed and Image Removed quickly enable/disable the created rules;
  • Image Removed box deletes a rule.

Additionally, the grid displays related product rule priorities and display modes. The rules with higher priority (10 is considered to be higher than 20) are executed first. The 'Display Mode' column shows the 'What to Display' display logic applied to a particular rule (described below).

Creating Related Products Rules

...

The new ARP rules can be created from the 'Manage Rules' section. To create a new rule, follow the steps below:

Step 1

...

Image Removed

...

Image Removed

In the 'Rule Information' section, decide on the following:

...

Info

The ARP block's priority comes into play when there are several ARP blocks with the conditions intersected.

For example, if you have two ARP blocks with the same block on-page position, only the ARP block with the highest priority will be displayed.

If these two blocks have the same priority value set, the block created earlier will have the priority over the other.

  • Select the Store View the ARP block is to be displayed on;
  • Select Customer Groups the ARP block is to be displayed to;
  • Select Customer Segments the ARP block is to be displayed to (Customer Segmentation module, v. 1.1.0 or newer, required).
Note

If Customer Segmentation is installed, enable the "Compatibility with frontend extensions" option in Stores → Configuration → Aheadworks → Customer Segmentation for correct integration with the present extension.  

Once done with the above settings, navigate to the 'Where to Display' section.

...

Image Removed

In the 'Where to Display' section you are suggested to specify the product attributes or attribute combinations defining on which pages the ARP block should be displayed. The module uses the native Magento rules.

Depending on your requirements, you can either:

1) Define a particular set of product pages that will display the ARP block (Example 1);

2) Display the ARP block on all product pages excluding a particular set of product pages (Example 2).

...

Column
width50%
Example 1:

Image Removed

Here we specified the product pages where ARP block should be displayed upon adding a category condition.

In this case, the ARP block will be displayed ONLY on the product pages that belong to the 'Sale' category.

Column
width50%
Example 2:

Image Removed

Here we specified the product pages where the ARP block should NOT be displayed by adding the 'SKU' and 'Color' -based conditions.

In this case, the ARP block will be displayed on ALL product pages of your store except for the ones that fall under the conditions set, namely: products with SKU 1, 2, or 3, and all products of the 'Red' color.

When you are done setting up the display location conditions, navigate to the'What to Display'section:

...

Image Removed

In the 'What to Display' section you are suggested to choose among the three display options:

  • Conditions Combination;

  • Who Bought This Also Bought (WBTAB);

  • Who Viewed This Also Viewed (WVTAV).

Note

The Who Bought This Also Bought and Who Viewed This Also Viewed display options are only available for the product and shopping cart pages. 

The 'Conditions Combination' option specifies the product attributes or attribute combinations defining the products to be displayed in the ARP block.

The process behind specifying the products is the same as in the Step 3. Depending on your requirements, you either include or exclude products.

...

Note

The ‘current product’ is either the product displayed on the current product page or the most expensive product displayed on the shopping cart page. The same logic is applied to the 'Who Viewed This Also Viewed' option.

...

Image Removed

...

The 'Suggest Products Only with Price Higher than Price of Current Product' option, accordingly, selects only the items with higher prices.

And the combination of these two filters even further narrows down the list of available related products. Suitable for big stores handling numerous visits and sessions.

When you are done with specifying the products you want to be displayed in the ARP block, navigate to the final 'How to Display' section.

...

Image Removed

...

  • Set the name of the ARP block that will be displayed to the store customers in the 'Block title' field;
  • Decide on how the ARP block will look like in the 'Block layout' field: grid or slider;
    • If you select the grid block layout option, it will be suggested to specify the number of rows in the block grid;
    • Specify if you want 'Add to cart' to display under every product in the ARP block with the 'Display "Add To Cart" button' selector;
    • Set the maximum number of products displayed in the ARP block in the 'Max products to display' field;
    • Decide on how you want the related products to be sorted in the ARP block, for example, by bestsellers, low to high prices, the newest, etc.
Info

The sorting orders for the WBTAB and WVTAV display modes are defined by default, by Order Counts and View Counts, accordingly. In the case of the enabled Override Option in the "Related Products, Up-Sells, and Cross-Sells " tab of the backend product editing form the related product blocks using the WBTAB and WVTAV display modes and containing native related products will be sorted by the product positions specified in the corresponding editing form.

Note

If you sort products by newest, users will see the recently added products first (not the recently modified ones).

...

Overriding Automatic Related Products

...

Image Removed

General Settings

...

Image Removed

The section contains the two setting blocks:

General. In this block you can:

  • prioritize multiple related product blocks taking the same position (for example, between the blocks with Priority 1 and Priority 5 the extension will display the first one);
  • define the number of days during which the module will process the data on the best-selling products.

Who Viewed This Also Viewed. The setting block enables the ‘Who Viewed This Also Viewed’ display mode and determines the period of processed sessions (e.g. ‘Empty’ means no limitations, which might slow down your website).

Note: If the WVTAV functionality is enabled, the module starts an additional cron job once in 24h updating the related product blocks working under the WVTAV display mode.

Custom Block Position

...

Automatic Related Products blocks can be displayed in a custom position with the help of the Magento widget. To display a block in a custom position, follow these steps:

Step 1

...

Image Removed

Configure the rest of the settings as you need. Note that you can use the same block for different store views.

Step 2

...

Image Removed

Info

Besides custom positioning, you can place the related product block instead of the native related and upsell blocks.

Continue to the widget settings. Set layout updates and other widget attributes. Don't forget to navigate to the 'Widget Options' tab and select the required ARP rule.

Step 3

Click 'Save' button. Now you can proceed to the store frontend and see the widget in the specified position.

...

You can duplicate the rule by expanding the box next to 'Save' button and choosing the 'Save & Duplicate' option.

Note

You can add the ARP block in custom page positions via the template of the corresponding page. Do this by inserting the following snippet in the template:

No Format
<?= /* @noEscape */ $block->getLayout()->createBlock(\Aheadworks\Autorelated\Block\Widget\Related::class)->setRuleId(X)->toHtml()?>

, where X in the 'setRuleId' method stands for the ID of the rule that supports custom positioning.

Uninstalling M2 Automatic Related Products

...

width50%

Manual Removal

...

1. Disable the module by executing the following commands:

No Format
php bin/magento module:disable Aheadworks_Autorelated
php bin/magento setup:upgrade

...

2. Remove the extension files from the following folder:

No Format
app/code/Aheadworks/Autorelated

...

width50%

Automatic Removal (via Composer)

...

1. Disable the module by executing the following commands:

No Format
php bin/magento module:uninstall Aheadworks_Autorelated

...

Warning

For more information follow the product user manual on our website


Product Page

Thank you for choosing Aheadworks!



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