cancel
Showing results for 
Search instead for 
Did you mean: 

How to add custom charges (fee) to item row total into cart for magento 2?

How to add custom charges (fee) to item row total into cart for magento 2?

 
5 REPLIES 5

Re: How to add custom charges (fee) to item row total into cart for magento 2?

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

https://mage2.pro/t/1075

https://mage2.pro/t/1150

Re: How to add custom charges (fee) to item row total into cart for magento 2?

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).

 

ItemPriceQtySubtotal
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.

Re: How to add custom charges (fee) to item row total into cart for magento 2?

Were you able to achieve this? I'm looking for exactly the same solution.

 

EDIT: I need this for Magento 1.9.x

Re: How to add custom charges (fee) to item row total into cart for magento 2?

Hi,

 

You can check out Magento Extra Fee Extension for Magento 1.x which will have this feature.

Re: How to add custom charges (fee) to item row total into cart for magento 2?

Hi,

Overwrite Magento\Quote\Model\Quote\Item class calcRowTotal() method and set $this->setCalculationPrice($total);

That's it.