SpecialPrice
Magento\Catalog\Model\Product\Price\SpecialPrice
What it does
This class represents a data model for product special prices in Magento 2.
Developers use it to manage time-bound promotional pricing, including setting the special price amount, validity dates (from/to), and associating it with specific products (SKU) and store views.
It's typically used when implementing custom pricing logic or working with Magento's efficient price API for bulk price operations.
Public Methods
- setPrice()
- getPrice()
- setStoreId()
- getStoreId()
- setSku()
- getSku()
- setPriceFrom()
- getPriceFrom()
- setPriceTo()
- getPriceTo()
- getExtensionAttributes()
- setExtensionAttributes()