Magento 2 Tutorials

How to Redirect to Shopping Cart in Magento 2

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:

Stores - Configuration

Next, click Checkout under the Sales tab:

sales-chekout cart

Go to the Shopping Cart section and select Yes for the After Adding a Product Redirect to Shopping Cart option:

redirect to shopping cart

Finally, click the Save Config at the top of the configuration page

Click on save config

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:

shopping cart output

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!

 

Subscribe Newsletter

Subscribe to get latest Magento news

40% Off for 4 Months on Magento Hosting + 30 Free Migration