Results 1 to 10 of 10
  1. #1
    Join Date
    Jun 2005
    Location
    Kelowna, BC Canada
    Posts
    1,075
    Plugin Contributions
    6

    Default By-pass Account Create Success Page

    When a new user visits your site as a guest and tries to check out, they are returned to the login/create account page as we all know.

    When they finish creating their account, they are sent to this useless "success" page (obviously its a success... a failure makes them stay on the page and correct their input).

    Other than clumbsiness though, there is an issue with this page. It has a "continue" button which is what the person is supposed to click... but that continue button is not hardcoded to go anywhere in particular, it depends on what history is set. This becomes a problem if they use their back button, or if they click the "edit" or other links on that success page.

    Anyway... this is a very simple "fix" to this. Its not really a fix, of course, because technically it is not a bug... I just think it is a useless extra step.

    Create these two files and this page will be entirely bypassed and the customer will contine where they should.

    *NOTE* This is even better if used in conjunction with my sessionWatcher contribution (see my sig)


    create file: /includes/auto_loaders/config.account_create_success_bypass.php with the following contents
    Code:
    <?php
    $autoLoadConfig[90][] = array('autoType'=>'class',
                                  'loadFile'=>'observers/class.account_create_success_bypass.php');
    $autoLoadConfig[90][] = array('autoType'=>'classInstantiate',
                                  'className'=>'account_create_success_bypass',
                                  'objectName'=>'account_create_success_bypass');
    ?>
    Then create file: /includes/classes/observers/class.account_create_success_bypass.php with the following contents
    Code:
    <?php
    class account_create_success_bypass extends base {
    	function account_create_success_bypass() {
        	global $zco_notifier;
    		$zco_notifier->attach($this, array('NOTIFY_HEADER_START_CREATE_ACCOUNT_SUCCESS'));
    	}
    	function update(&$callingClass, $notifier, $paramsArray) {
    		if (sizeof($_SESSION['navigation']->snapshot) > 0) {
    			zen_redirect(zen_href_link($_SESSION['navigation']->snapshot['page'], zen_array_to_string($_SESSION['navigation']->snapshot['get'], array(zen_session_name())), $_SESSION['navigation']->snapshot['mode']));
    		}
    	}
    }
    ?>
    cheers!

    - Steven

  2. #2
    Join Date
    Sep 2004
    Posts
    2,420
    Plugin Contributions
    2

    Default Re: By-pass Account Create Success Page

    Hi Steven-

    I created the two files and uploaded. Then when I attempt to access shop home page (or any other page) I observe the following error:

    Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /mypath/shop/includes/auto_loaders/config.account_create_success_bypass.php:9) in /mypath/shop/includes/functions/sessions.php on line 102

    Fatal error: Cannot instantiate non-existent class: account_create_success_bypass in /mypath/shop/includes/autoload_func.php on line 79

    So I moved config.account_create_success_bypass.php to includes/auto_loaders/overrides

    And no more error and was able to see my shop pages.

    But I then tested. Added an item to shop cart while not logged in and then went to checkout then redirected to create account page. After creating a new account I indeed observed the checkout success page.

    Any thoughts or recommends?

    BTW I have your Session Watcher 1.01 installed and it is enabled.

    Thanks,

    Woody

  3. #3
    Join Date
    Jun 2005
    Location
    Kelowna, BC Canada
    Posts
    1,075
    Plugin Contributions
    6

    Default Re: By-pass Account Create Success Page

    Yeah... moving it to overrides wouldn't do anything (because its not overriding anything)... it has to be in the auto_loaders main folder...

    Double check the spelling on the filenames and make sure you got them exact... in the meantime, I'll delete mine and start over following only the instructions above to see if I forgot to put something in there :)

    - Steven

  4. #4
    Join Date
    Jun 2005
    Location
    Kelowna, BC Canada
    Posts
    1,075
    Plugin Contributions
    6

    Default Re: By-pass Account Create Success Page

    Nope... works fine on mine following only the instructions above.

    So either that means you made an oops in the instructions, or one of my other mods makes it work, or one of your other mods makes it not work... and its not sessionWatcher because we both have that.

    So someone needs to test it on a fresh install to see which is which.

    I have a feeling that its might be the typo though... this error:
    Code:
    Fatal error: Cannot instantiate non-existent class: account_create_success_bypass in /mypath/shop/includes/autoload_func.php on line 79
    seems to suggest perhaps the /includes/classes/observers/class.account_create_success_bypass.php file isn't correct? Make sure you put it exactly in the right place and that it is spelled correctly.

    I'll try to get a fresh zen copy installed to test just in case... won't be today though.

    - Steven

  5. #5
    Join Date
    Aug 2004
    Location
    Saint Petersburg, Russia
    Posts
    1,786
    Plugin Contributions
    13

    Default Re: By-pass Account Create Success Page

    Thanks s_mack!

    To woody:
    Quote Originally Posted by Woodymon View Post
    Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /mypath/shop/includes/auto_loaders/config.account_create_success_bypass.php:9) in /mypath/shop/includes/functions/sessions.php on line 102
    Most likely it is a standard error - superfluous lines at the end of a file config.account_create_success_bypass.php. Error message talk about 9 line, but here only 7 lines:
    Code:
    <?php
    $autoLoadConfig[90][] = array('autoType'=>'class',
                                  'loadFile'=>'observers/class.account_create_success_bypass.php');
    $autoLoadConfig[90][] = array('autoType'=>'classInstantiate',
                                  'className'=>'account_create_success_bypass',
                                  'objectName'=>'account_create_success_bypass');
    ?>
    Most simple - to try the attached file.
    Attached Files Attached Files

  6. #6
    Join Date
    Sep 2004
    Posts
    2,420
    Plugin Contributions
    2

    Default Re: By-pass Account Create Success Page

    Thank you for the follow-ups both Steven & Andrew-

    I had php comments at the beginning of each file. I guess Zen Cart does not like in this instance. I removed from both files and all is ok now and the checkout success page is bypassed.

    I will try to remember to double check my file beginnings and endings more carefully in the future ;-).

    But now I can also see where the checkout sucess page would be informative to newbies so they can double check their addressbook entry immediately after creating their account and also provides some assurance that the account creation was successful.

    Woody
    Last edited by Woodymon; 25 Nov 2006 at 12:35 PM.

  7. #7
    Join Date
    Jun 2005
    Location
    Kelowna, BC Canada
    Posts
    1,075
    Plugin Contributions
    6

    Default Re: By-pass Account Create Success Page

    Quote Originally Posted by Woodymon View Post
    But now I can also see where the checkout sucess page would be informative to newbies so they can double check their addressbook entry immediately after creating their account and also provides some assurance that the account creation was successful.
    And I'm sure the Zen creators agree with you, which is why this "feature" is there.

    Its not for me though. They have plenty of opportunity to revue and fix their address during checkout, which is when that should be done. But that's not the problem.. the problem is if they DO review and/or edit thier address (through one of the buttons) then go back with the BACK button... now when they hit Continue they're taken back to the account review/edit page rather than going where they expect.

    So I think its better to just not have it.

    As for success confirmation... well, ok I guess. To me that's a useless extra step and the checkout process has too many as it is. But then I would edit the success page to get rid of the edit buttons to avoid the potential navigation history problem

    - Steven

  8. #8
    Join Date
    Sep 2006
    Posts
    257
    Plugin Contributions
    0

    Default Re: By-pass Account Create Success Page

    this is a great script.. however.. mine has stopped working... it worked great.. by passing the page... now... it goes to the success page again.. any ideas???

  9. #9
    Join Date
    Jun 2005
    Location
    Kelowna, BC Canada
    Posts
    1,075
    Plugin Contributions
    6

    Default Re: By-pass Account Create Success Page

    You changed something. I wouldn't even know where to begin from the lack of information. You installed some mod or update or did something that conflicts with the contribution. Scripts don't just stop working by themselves :)

    - Steven

  10. #10
    Join Date
    Sep 2006
    Posts
    257
    Plugin Contributions
    0

    Default Re: By-pass Account Create Success Page

    nope... no mods.... only code eds to side box and time outphp text edit... nothing else i could think of.. i downloaded the zip and re uploaded them... still nothing... i deleted them then re uploaded... nothing.... but no mods... any ideas where to start

 

 

Similar Threads

  1. create account success page not displaying!
    By rebelman in forum General Questions
    Replies: 1
    Last Post: 2 Jul 2011, 09:16 PM
  2. Create an Account Success page shows up blank
    By kittybabylove in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 10 Nov 2009, 10:35 AM
  3. Blank Page on Create Account Success
    By RAM1001 in forum General Questions
    Replies: 5
    Last Post: 31 Aug 2009, 11:44 AM
  4. Bypass create account success page and go to My Account instead?
    By dealbyethan.com in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 3 Dec 2007, 01:50 PM
  5. Replies: 59
    Last Post: 30 Dec 2006, 05:24 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR