Magento – Get product price after applied Catalog Price Rule

catalog-price-rulesmagento2priceproduct

I have created a catalog price rule in Magento adminarea.

For ex. Product A's price is 100 and after applying the catalog price rule, its price becoming 80.

I am trying to fetch the price 80 programmatically but the below code is returning original price only i.e. 100.

$product->getPrice();
$product->getFinalPrice();

Best Answer

I got the discounted price by below code:

$price = $product->getPriceInfo()->getPrice('final_price')->getAmount()->getValue();