Hello Magento Friends ๐Ÿ‘‹,

In the present article, I will be showing How to Redirect on Checkout Page After Add to Cart in Magento 2. Before beginning, take a look at our last blog was How to Move Apply Coupon to Order Summary in Magento 2.


The Magento store owners always face a key issue on how to quicken the buying process for customers in order to decrease bounce rates and cart abandonment. When the customer adds products to the cart it is redirected to the shopping cart page where the list of products is displayed. However, admins can skip this step by directly redirecting them to the checkout page which also contains the cart details.

Redirecting to the checkout page directly, benefits in saving time for customers. As the loading time of the shopping cart page is skipped, it will result in minimized shopping cart abandonments.

Let us look at the steps to Redirect on Checkout Page After Add to Cart in Magento 2 ๐Ÿš€

Steps to Redirect on Checkout Page After Add to Cart in Magento 2:

Step 1: First, we need to create a โ€œdi.xmlโ€ file inside our extension at the following path:


Now add the below code:

Step 2: After that, we need to createย  โ€œCartplugin.phpโ€ file inside the below folder path of extension:


And add the below code:ย 

Thatโ€™s it.


Hence, now you are able to redirect your customers on the checkout page after add to cart. Eliminate this task and redirect your store customers to a specific URL with Custom Redirect Extension for Magneto 2.

If you have queries regarding the above code, feel free to ask me in the comment section and I will be right back to you. See you in the next article, till then keep coding and keep sharing.

Happy Coding ๐Ÿ˜Š

Click to rate this post!
[Total: 7 Average: 5]