I have tried to set custom price for this purpose but its getting multiplied by quantity. All i need to add an extra ammount(like 50$) to each quote item after its added too the cart. So it will be like this if have 2 products in cart.. First product Price 5.00$ qty is 10. Second Product Price 3.50$ qty is 20.
I want the calculation be like : (5.00 * 10 + 50) + (3.50 * 20 + 50) item 1 subtotal = 100. item 2 subtotal = 120. Total = 220.
For Magento 1 it was implemented in Sales_Quote_Item model in CalcRowTotal(). like this.. $baseTotal = $this->getBaseRowTotal() + $additionalCharges;
$baseTotal = $this->getBaseRowTotal() + $additionalCharges; //$additionalCharges is the custom value that i want to add. $total = $this->getStore()->convertPrice($baseTotal); $this->setRowTotal($this->getStore()->roundPrice($total)); $this->setBaseRowTotal($this->getStore()->roundPrice($baseTotal));
But in Magento 2 this is not working . Can anyone Help ??