I see my mini cart not updating its items when I delete an item from the cart programmatically.
but the cart updating perfectly as per my requirement only after I added a new item into cart or any cart event-triggered non programmatically.
magento2mini-cart
I see my mini cart not updating its items when I delete an item from the cart programmatically.
but the cart updating perfectly as per my requirement only after I added a new item into cart or any cart event-triggered non programmatically.
Best Answer
You can fix this issue by creating a file
app\code\Vendor\Extension\etc\frontend\section.xml
using following code inside your extension folder.In this action parameter name, you have to pass the full action (For ex. checkout/cart/add ) in which cart is updated. It means you programmatically delete or add a product to cart to the shopping cart.
Also, you can add below code in your observer to refresh the quote for the customer.
Hope it helps!!!