Q:

Magento Product Addtocart go to Checkout Page by skip Cart Page

In Magento, 
when the AddtoCart button is clicked the product should go straight to checkout page instead of cart page, i dont need to add the product to cart page, is it possible?
Any ideas?
Thanks.

A:

Then config file i have added events observer,
<config>
....
    <frontend>
        <events>
            <controller_action_postdispatch>
                <observers>
                    <controller_action_after>
                        <class>membership/observer</class>
                        <method>membershipControllerActionPostDispatch</method>
                    </controller_action_after>
                </observers>
            </controller_action_postdispatch>
            <add_to_cart_after>
                <observers>
                    <add_to_cart_after>
                        <class>membership/observer</class>
                        <method>membershipCheckout</method>
                    </add_to_cart_after>
                </observers>
            </add_to_cart_after>
        </events>
    </frontend>
.....    
</config>

and My Observer file,
class Att_Membership_Model_Observer
{
    public function membershipControllerActionPostDispatch($observer)
    {
        if($observer->getEvent()->getControllerAction()->getFullActionName() == 'checkout_cart_add')
        {
            Mage::dispatchEvent("add_to_cart_after", array('request' => $observer->getControllerAction()->getRequest()));
        }
    }
   public function membershipCheckout($observer)
   {
      if (!Mage::helper('customer')->isLoggedIn())
      {
         Mage::app()->getFrontController()->getResponse()->setRedirect(Mage::getUrl('checkout/onepage', array('_secure'=>true)));
      }
   }

}

this gives solution for me,
the addtocart go straight to checkout page.
Thanks @sander

