📊 State of Magento 2025

The Home for Magento 2 Excellence

Quality-tested Magento 2 modules. Explore. Evaluate. Elevate. #magento2

606 Modules
385 Ready
218 Need Help
🏆 Leaderboard
Stale v1.1.8

Custom Product Relation Sample Extension

magepal/link-product

This extension creates a new product accessory relationship in addition to the default ones.

42,355
Downloads
Below average
54
GitHub Stars
Above average
1y ago
Last Release
2
Open Issues
Build Issues
0/3 checks passed

Build Tests

Composer Install
DI Compile
Templates

Code Quality

CS Coding Standard
L1 PHPStan

Tested on Magento 2.4.8-p3

Recent Test History

Each release is tested against the latest Magento version at that time.

v1.1.8 on Magento 2.4.8-p3
Dec 15, 2025
v1.1.8 on Magento 2.4.8-p2
Aug 14, 2025
v1.1.8 on Magento 2.4.8
May 20, 2025
v1.1.8 on Magento 2.4.7-p4
Feb 15, 2025
v1.1.8 on Magento 2.4.7-p3
Oct 18, 2024
v1.1.8 on Magento 2.4.7-p2
Sep 21, 2024

+5 older tests

Looking for Contributors

Composer installation fails. Your contribution could help the entire Magento community!

Contribute

Share This Module's Status

Custom Product Relation Sample Extension Magento compatibility status badge

README

Loaded from GitHub

Custom Product Relation Sample Extension for Magento 2.2.x and 2.3.x (with zero class rewrite or hacks)

Total Downloads Latest Stable Version

Create a new product accessory relationship in additional to the default Up-sell products, Related products, and Cross-sell products options available in Magento.

Magento Custom Product Relation

Please Note: Our extension perform all of the backend logic of relating the various product, you will need to design the frontend component and where to place these products

Usage

    public function __construct(
        ...
        \MagePal\LinkProduct\Model\Accessory $accessory,
        ....
    ) {
        ...
        $this->accessory = $accessory;
    }
    
    $product = $currentProduct;
    return products
    $accessoryItems = $this->accessory->getAccessoryProducts($product);
    //return product ids
    $accessoryItemIds = $this->accessory->getAccessoryProductIds($product);
    

Step 1

Using Composer (recommended)
composer require magepal/link-product
Manually
  • Download the extension
  • Unzip the file
  • Create a folder {Magento 2 root}/app/code/MagePal/LinkProduct
  • Copy the content from the unzip folder

Step 2 - Enable extension ("cd" to {Magento root} folder)

  php -f bin/magento module:enable --clear-static-content MagePal_LinkProduct
  php -f bin/magento setup:upgrade

Contribution

Want to contribute to this extension? The quickest way is to open a pull request on GitHub.

Importing via CSV or 3rd party extensions

To import via CSV, you need to have the a patch applied to the core (until merged to Magento 2).

Support

If you encounter any problems or bugs, please open an issue on GitHub.

Need help setting up or want to customize this extension to meet your business needs? Please email support@magepal.com and if we like your idea we will add this feature for free or at a discounted rate.

Magento 2 Extensions

© MagePal LLC. | www.magepal.com

This content is fetched directly from the module's GitHub repository. We are not the authors of this content and take no responsibility for its accuracy, completeness, or any consequences arising from its use.