0

we provide coupon codes for only Registered customers.

so what we did is when a guest applied a coupon code it will display a message

"please register" , but when guest succesfully registered , its redirecting to "checkout" page instead of

"shopping Cart" page. i want to redirect to "shopping cart" page after registration.

please help me to find solution

thanks in advance

  • 1
    have you tried any code ? – Pradeep Sanku May 28 '15 at 7:03
  • not yet, i am working on that..... – Baby in Magento May 28 '15 at 7:04
1

try this:

  1. Go to customer accountcontroller find _welcomeCustomer method.
  2. Search for

$successUrl = $this->_getUrl('//index', array('_secure' => true));

replace this code with your custom URL

$successUrl = $this->_getUrl('customURL', array('_secure' => true));

*where is customURL input the page that you want the redirection to be made.

  • 1
    if you redirect the customer to my cart after registration it will show nothing because he did not add any items to his cart. – vasilisdmr May 28 '15 at 7:42
  • 1
    i understand now, but i can't think how to solve this problem now, because there is no "my cart" page. update your question in order to be more specific. – vasilisdmr May 28 '15 at 7:52
  • 1
    i don't if a redirection in my cart is possible, without having any items in the cart. – vasilisdmr May 28 '15 at 9:44
  • 1
    in your other comment you told me that you want when a guest is adding items to his cart and his going to apply the coupon code to be able too, but you have set only registered customers to be able to apply coupons, so i suggest let the guests apply coupon codes too. I am saying that because the cart page with items it's not a page , the items are adde to the cart dynamically and therefore i believe that cannot return to that cart page instance if you leave ,register and try to return. – vasilisdmr May 28 '15 at 10:26
  • 1
    i mean use your logic, you leave the cart with the items added, you register and then you wish to return to the cart with the items added but as a different user, as a registered customer. I don't if you can do this programmaticaly by holding somewhere your guest items and show that cart, i don't if you understood me. – vasilisdmr May 28 '15 at 10:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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