Tag: magento2

Update cart price In Magento2

Update cart price In Magento2

I found solution myself to update the price of the item added to cart. Using Object Manager:             $cart = $objectManager->get(‘\Magento\Checkout\Model\Cart’);           $priceHelper = $objectManager->create(‘Magento\Framework\Pricing\Helper\Data’);          $items = $cart->getQuote()->getAllItems();               if($items){                foreach ($items as $item){                  …

Back to top