Log in
Model

Link

Magento\Catalog\Model\ResourceModel\Product\Link

What it does

This resource model manages product link relationships in the database, such as related products, up-sells, and cross-sells.

Developers use this class to save, retrieve, or delete product associations, query which products are linked to each other, and manage link attributes like position or quantity.

It's commonly used when working with product recommendations or configurable product relationships.

Public Methods

  • deleteProductLink()
  • getProductLinkId()
  • hasProductLinks()
  • saveProductLinks()
  • getAttributesByType()
  • getAttributeTypeTable()
  • getChildrenIds()
  • getParentIdsByChild()