Magento: Redirect to Checkout after “Add to Cart”

Magento uses the default process that when product is “Add to Cart” from category page or from product detail page then product is added to cart and redirect to the cart page. Here, we are directly redirect to the checkout onepage from the category list and product detail page.

The Process of redirection is done by using the event observer.

Your config would look something like this:


You could create an observer listening for the checkout_cart_add_product_complete event and in there you could do something like the following:

public function addToCartComplete(Varien_Event_Observer $observer) {
    // Send the user to the Item added page
    $response = $observer->getResponse();    
    $request = $observer->getRequest();

The another method to Redirect to Checkout after “Add to Cart” like the following :
The URL for the redirect process can be found under
app/code/core/Mage/Checkout/controllers/ in CartController.php

Copy this File (or just change it quick) and search function

protected function _goBack()

the first part is for redirecting to product if this is set in backend. but take a closer look at


Change it to


Hope it helps you while you’re treading you way though Magento addtocart process. Comment here for any questions or suggestions.

Speak Your Mind

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: