I have an observer who changes the price of the items and at the end of the routine the whole order changes, but on my cart edit screen the subtotal of the item still keeps the old price of the item, how can I fix this?

The functions used to make the change are:



enter image description here

Magento 2.3.5


Try to clear checkout session storage in your observer before you save the quote.

See for code reference - \Magento\Checkout\Observer\UnsetAllObserver::execute()


Solved. I had to change the price also by line by function:

$item->setRowTotal($item->getCustomPrice() * $item->getQty());

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.