Free Magento Redirect Cart to Checkout Page

Magento Redirect To Checkout After Adding To Cart: An Easy How-To Guide

“How to set up a quick buying process for customers to increase conversion rates and reduce abandoned rate”  is always an issue mostly store owners take much concern.

When customers add products to their cart by clicking “Add to Cart”,  they will be redirected to the shopping cart page to view their selected products. Actually there’s an option by Magento default for admins to choose sending the user to the cart or leaving them on the page. However, this step takes time and there is also a list of chosen items displayed in the checkout page.

Therefore, to save time for customers, some shop owners consider skipping the shopping cart page and directly moving customers to the checkout page. This make customers buy products faster without waiting for loading the shopping cart page which can cause them to abandon their carts.


In this blog posts, we will introduce you (especially administrators of online stores and developers) the way we can disable the shopping cart page to improve the buying process in your site.

Create Magento redirect to checkout by using Event observer method

After products are added to carts,  it is a default process that the site will redirect to the shopping cart page. So how to disable loading the shopping cart page and redirect  to checkout page  after “Add to cart” even when they access intentionally to the URL of the shopping cart?

The easiest way is using the event observer method. It means that you take "controller_action_predispatch_checkout_cart_index" event to redirect 301 from the cart page to the checkout page. This is the “fired” event before loading "checkout_cart_index" page.

This following code is added to the declaration of event observer in the configuration file:


Enable or disable module

You may want to enable or disable module in some cases, so you can add a Store Config in the backend to easily use. You create the config/system.xml file:

<?xml version="1.0"?>
<gotocheckout  translate="label" module="disablecart">                    
<label>Redirect Cart To Checkout</label>
<general translate="label">
<enable translate="label">


After finishing these code, you can see “Redirect Cart To Checkout” in the Configuration and then you can choose Yes or No to enable or disable it.


In the Model/Observer.php file, we declare disableCart

   public function disableCart(Varien_Event_Observer $observer){
   $storeId = Mage::app()->getStore()->getId();
   if(Mage::getStoreConfig('gotocheckout/general/enable', $storeId)){
    $controller = $observer->getControllerAction();

Tips: If the website uses the One Step Check Out module, it may have to redirect to the other URL of the checkout: ->setRedirect(Mage::getUrl('onestepcheckout’),301)

Finally, when you finish the setup, you need to clear out cache and reload the page to test.

If you do not want to take much time for carrying out these things, you can easily get the full functions by downloading the full version of the Disable cart module [DOWNLOAD HERE]Our module will provide you all functions without any efforts.

If our blog has brought you helpful knowledge, please Like and Subscribe to our blog to get the latest shares for your Magento site.  Moreover, let's checkout more latest Magento 2 extensions to install for your website and improve shopping experience as well as increase sales effectively!

Leave a Reply