Product
Magento\SalesRule\Model\Rule\Condition\Product
What it does
This class defines product-related conditions for shopping cart price rules (SalesRule) in Magento 2.
Developers use this to create rule conditions that evaluate product attributes, quantities, prices, categories, and other properties to determine if a cart item qualifies for promotional discounts.
It extends the base product condition class to add cart-specific attributes like quantity in cart, price in cart, and parent/children scope for product attributes.
Public Methods
- getAttribute()
- getAttributeName()
- loadAttributeOptions()
- getAttributeElementHtml()
- setAttribute()
- loadArray()
- asArray()
- validate()
- getValueElementChooserUrl()