Model
Product
Magento\Catalog\Model\ResourceModel\Product
What it does
This is the resource model for Magento 2 products, handling all database operations for product entities.
Developers use this class to load, save, delete products, manage product-website and product-category relationships, retrieve product data by SKU or ID, and perform product duplication.
It serves as the main data access layer between the product model and the database tables.
Public Methods
- getEntityType()
- getProductWebsiteTable()
- getProductCategoryTable()
- getWebsiteIds()
- getWebsiteIdsByProductIds()
- getCategoryIds()
- getIdBySku()
- delete()
- getCategoryCollection()
- getAvailableInCategories()
- getDefaultAttributeSourceModel()
- canBeShowInCategory()
- duplicate()
- getProductsSku()
- getProductsIdsBySkus()
- getProductEntitiesInfo()
- countAll()
- validate()
- load()
- save()
- _resetState()