Log in
Model

AbstractType

Magento\Catalog\Model\Product\Type\AbstractType

What it does

This is the abstract base class for all product types in Magento 2 (Simple, Configurable, Bundle, etc.).

Developers extend this class when creating custom product types to define type-specific behaviors like cart preparation, option handling, salability checks, and product relationships.

It provides core functionality for product type operations including validation, option processing, and integration with the cart and order systems.

Public Methods

  • deleteTypeSpecificData()
  • setTypeId()
  • getRelationInfo()
  • getChildrenIds()
  • getParentIdsByChild()
  • getSetAttributes()
  • attributesCompare()
  • getEditableAttributes()
  • getAttributeById()
  • isVirtual()
  • isSalable()
  • processConfiguration()
  • prepareForCartAdvanced()
  • prepareForCart()
  • processFileQueue()
  • addFileQueue()
  • getSpecifyOptionMessage()
  • checkProductBuyState()
  • getOrderOptions()
  • save()
  • beforeSave()
  • isComposite()
  • canConfigure()
  • canUseQtyDecimals()
  • getSku()
  • getOptionSku()
  • getWeight()
  • hasOptions()
  • updateQtyOption()
  • hasRequiredOptions()
  • getStoreFilter()
  • setStoreFilter()
  • getForceChildItemQtyChanges()
  • prepareQuoteItemQty()
  • assignProductToOption()
  • setConfig()
  • getSearchableData()
  • getProductsToPurchaseByReqGroups()
  • processBuyRequest()
  • checkProductConfiguration()
  • hasWeight()
  • setImageFromChildProduct()
  • getIdentities()
  • getAssociatedProducts()
  • isPossibleBuyFromList()