You can implement it as a custom checkout.cart.totals handler: https://mage2.pro/t/1070
Or you can just set it up as a tax:
Thanks for your answer.
Actually I need code to increase row total of item through pro-grammatically after event of add to cart. e.g. If product A has price $14 Then I need row total as $14(Price) + $2(Fee) = $16(Row Total of item).
Item | Price | Qty | Subtotal |
LifeLong Fitness IV | $14.00 + $2(fee) | 1 | $16.00 |
How to override model quote item class. that was as Mage_Sales_Model_Quote_Item in magento 1 and from which class in magento 2.
How to override method public function calcRowTotal() in magento 2.
Please help me for the same.
Were you able to achieve this? I'm looking for exactly the same solution.
EDIT: I need this for Magento 1.9.x
Hi,
Overwrite Magento\Quote\Model\Quote\Item class calcRowTotal() method and set $this->setCalculationPrice($total);
That's it.