after customer logged in to our site, it's redirecting to "my account " page.

but i want to redirect to "shopping cart" page.

i reffered this link for

[ Creating account = > Shopping cart page]

now we need for

"loogged in = > "shopping cart page

please help me to find solution


1 Answer 1


In this case,you can use event customer_login and


  • fire this event on frontend <frontend> area.
  • Basically when customer are loggedin success then the event is fire.Also and put a condition for current full action for Mage::app()->getRequest()->getFullActionName()=='customer_account_loginPost' because of Customer also register at checkout step

Then at observer redirect to your shopping cart page using below code:


Config.xml code:

<frontend><!-- area -->
      <customer_login> <!-- identifier of the event we want to catch -->
          <customer_login_redirect> <!-- identifier of the event handler -->
            <type>model</type> <!-- class method call type; valid are model, object and singleton -->
            <class>magento/observer</class> <!-- observers class alias -->
            <method>redirectiontoCart</method>  <!-- observer's method to be called -->

Observer.php is :

class StackExchange_Magento_Model{
public function redirectiontoCart(Varien_Event_Observer $observer)



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.