How to get Special price collection by Product SKU in Magento 2?

Get Special Price data by Product SKU in Magento 2. Special price is the price, which offers discount/sale to the original price.

You need to use interface,
Magento\Catalog\Api\SpecialPriceInterface to retrieve special price collection with price_from, price_to, store_id and sku.

Just Passing Product SKU as an array ([$sku]) in the get($sku) method of SpecialPriceInterface.

Pass SKU value to get speicific products, special price data,
$specialPrice = $this->getSpecialPriceData($sku);

Output:
Product has special price, it will display array of result,

If Product hasn’t special price result will be empty array.

Leave a Reply