How to add the item to user cart
-
Hi,
I am trying to add the item to the cart and using Cart::addProduct method but everytime we execute a new cart instance is created. How can we fix it? Should we manually set the cart to session after adding to cart?
Thanks and regards -
Hi there,
Which version of Bagisto are you using?
-
bagisto version is 1.4.5
-
@samparker what you can do is that you can only show addProduct function.
or for a better understanding of your query can you please share screenshot for the same. -
Hello @ashish2409 the addProductFunction is actually a function from bagisto core defined in the Cart class at \Webkul\Checkout\Cart::addProduct
-
Hi @samparker,
We did not face that kind of issue in Bagisto Core.
Something went wrong at your end. please elaborate to find the exact issue.
-
I got the issue. The route had a typo in the middleware.
-
Hi @samparker,
If you still facing the issue please let me know.