Log in
Model

WeightResolver

Magento\Catalog\Model\Product\Edit\WeightResolver

What it does

This class determines whether a product has physical weight or not during product editing operations.

Developers use this resolver to check if a product's weight attribute should be considered, which is important for shipping calculations and product type validations.

It's particularly useful when handling different product types where some have weight (simple, configurable) and others don't (virtual, downloadable).

Public Methods

  • resolveProductHasWeight()