Skip to content

Minicart no update with custom add to cart #3287

@quienti

Description

@quienti

Hi!

I created my custom module for add a product to my cart, if I use my controller with this form :

<form action="http://*********/test/cart/add/uenc/*******/product/471/" method="post" id="product_addtocart_form" novalidate="novalidate">

My product is in my cart, but minicart is not update, and change page not resolve this problem.

But, if I change my form link with magento controller like this :

<form action="http://*********/checkout/cart/add/uenc/*******/product/471/" method="post" id="product_addtocart_form" novalidate="novalidate">

It's work fine

In my controller, I have just change this

namespace Magento\Checkout\Controller\Cart
to this
namespace Test\Test\Controller\Cart;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions