I have the following problem:

I want to get the final price programatically but it always displays 0

I tried with :



both displays 0

On the other hand $product->getPrice() displays the normal regular price correctly

Is there an other way to get the special price?

I get the products like this:

$collection = $block->getResourceModel('catalog/product_collection')
    ->addAttributeToFilter( 'sku', array('in' => $alle_skus) )
  • What is the code you are using to create $product object? Sep 8, 2020 at 12:53
  • actually i got the answer. $product->getPriceInfo()->getPrice("final_price")->getMinimalPrice()->getValue();
    – Ilijanovic
    Sep 8, 2020 at 12:55
  • No not this one. $product object creation code? Sep 8, 2020 at 12:55
  • @SukumarGorai let me see
    – Ilijanovic
    Sep 8, 2020 at 12:58
  • @SukumarGorai i have added the code
    – Ilijanovic
    Sep 8, 2020 at 13:02

2 Answers 2


You can use \Magento\Catalog\Model\ProductRepository to get Special Price.

To get the special price you can do it a couple of ways, this one being by product ID:

/** @var \Magento\Catalog\Model\ProductRepository $productRepository */
$this->_productRepository = $productRepository;

$product = $this->_productRepository->getById($id); <-- get the product by product ID
return $product->getSpecialPrice();

Or you can do by product SKU:

/** @var \Magento\Catalog\Model\ProductRepository $productRepository */
$this->_productRepository = $productRepository;

$product = $this->_productRepository->get($sku); <!-- get the product by product SKU
return $product->getSpecialPrice();

Get product special price

// get product regular price
$prd_regular_pice = $product->getPrice();

//get product final price
$prd_final_pice = $product->getFinalPrice(); // special price 

if($prd_regular_pice != $prd_final_pice) {
    $special price = $prd_final_pice;
} else {
    $special price = "No Special Price"
// get special price

echo  "Special Price  ".$special price;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.