1

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

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

0

With taxes and rounding penny issue:

($item->getRowTotal()-$item->getDiscountAmount()+$item->getTaxAmount()+$item->getDiscountTaxCompensationAmount())

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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