How to Redirect to Shopping Cart in Magento 2
- Syed Muneeb Ul Hasan
- January 22, 2018

At a Magento 2 store, the visitors add products to the cart by clicking the Add to Cart button. Once they are done, they need to click the cart icon at the top of the page to go to the shopping cart page.
In some cases, store owners wish to send the visitors directly to the shopping cart page when the Add to Cart button is clicked. This tutorial offers a simple solution to this requirement.
Note: Sending the visitor to the shopping cart page in response to the click on the Add to Cart button is not a recommended Magento design practice. Only use it if the circumstances of the store demand this action.
Open the store’s Admin Panel and navigate to STORES → Configuration:
Next, click Checkout under the Sales tab:
Go to the Shopping Cart section and select Yes for the After Adding a Product Redirect to Shopping Cart option:
Finally, click the Save Config at the top of the configuration page
Testing the Process
To test the functionality, go to any product page and click the Add to Cart button. You will be redirected to the Shopping Cart:
Wrapping Up
I hope that you could now redirect the users to the shopping cart page after they click the Add to Cart button. Remember that it is not a recommended design practice. If you still have any confusion related to this tutorial, just leave a comment below!