Forums / Templates, Stylesheets, Page Layout / how does login page decide where to redirect after create an account?

how does login page decide where to redirect after create an account?

Locked

Views: 2,308

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
28 Feb 2009, 4:43 PM
#1
weber avatar

weber

Zen Follower

Join Date:
Nov 2005
Posts:
157
Plugin Contributions:
0

how does login page decide where to redirect after create an account?

i am going to do something on the login page.

when you create an account from shopping cart, the create account page will redirect your page to shopping cart, how? where is those codes...

28 Feb 2009, 5:05 PM
#2
bunyip avatar

bunyip

Totally Zenned

Join Date:
Sep 2004
Location:
Western Massachusetts
Posts:
2,361
Plugin Contributions:
1

Re: how does login page decide where to redirect after create an account?

Where the customer is redirected to after creating an account depends on whether they have something in the cart or not. The relevant code is in in includes/modules/pages/create_account_success/header_php.php:

// redirect customer to where they came from if their cart is not empty and they didn't click on create-account specifically
if ($_SESSION['cart']->count_contents() > 0) {
  if ($origin_href != zen_href_link(FILENAME_DEFAULT)) {
    zen_redirect($origin_href);
  }
}

Neville
An assumption is what you arrive at when you get tired of thinking...

22 May 2009, 10:59 AM
#3
beep avatar

beep

New Zenner

Join Date:
Nov 2008
Location:
London
Posts:
94
Plugin Contributions:
0

Re: how does login page decide where to redirect after create an account?

Hello,
Which bit of code dictates the redirect address?
At present my create account function is redirecting customers to a page that appears to not exhist but when I type the create_account_success address directly into the browser it displays. The best I can gather is that it is redirecting to the wrong location.

So.. maybe i know what the problem is but i do not know how to fix it. :huh:
Any ideas?

(ps; I do nor read php, im sure that does't help)

Any help greatly appriciated. Beep