lowestPriceOptionsProvider = $lowestPriceOptionsProvider ?: ObjectManager::getInstance()->get(LowestPriceOptionsProviderInterface::class); } /** * Define if the special price should be shown * * @return bool */ public function hasSpecialPrice() { $product = $this->getSaleableItem(); foreach ($this->lowestPriceOptionsProvider->getProducts($product) as $subProduct) { $regularPrice = $subProduct->getPriceInfo()->getPrice(RegularPrice::PRICE_CODE)->getValue(); $finalPrice = $subProduct->getPriceInfo()->getPrice(FinalPrice::PRICE_CODE)->getValue(); if ($finalPrice < $regularPrice) { return true; } } return false; } }