Normally in Magento 2 cart page show subtotal. But I would like to get subtotal after deducting discount if any cart rules applied or coupon code applied to any product.

2 Answers 2


You can get the final row total of the item in the cart by this code

echo $_item->getRowTotal() - $_item->getDiscountAmount();

where the $_item is the Cart Quote Item


With taxes and rounding penny issue:


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.