Reputation: 478
How can I get the discount applied on cart line item individually?
Is this possible to get total unit price after applying discount?
Upvotes: 4
Views: 4819
Reputation: 4073
To discount applied on cart line item you can use
$item->getDiscountAmount();
To calculate the price subtracting the discount amount $item->getDiscountAmount(), use below
$price = $item->getPrice() - $item->getDiscountAmount();
This will give you the total unit price after discount.
Upvotes: 5