Contributions

Features (Category Index)
Search: 

Login and Return to same page

This allows User's to log in and return to the page they were asked to login for, not being sent back to index.php

Open application top paste at bottom before ?>



// if the customer is not logged on, set the page to return to upon login

if ( (basename($PHP_SELF) != FILENAME_LOGIN) && (basename($PHP_SELF) != FILENAME_LOGOFF) && (!strstr($PHP_SELF,'create')) && (!strstr($PHP_SELF,'popup')) {

$navigation->set_snapshot();

}


**************************************

Open Logout.php
Place anywhere

if (sizeof($navigation->snapshot) > 0) {

$origin_href = tep_href_link($navigation->snapshot['page'], tep_array_to_string($navigation->snapshot['get'], array(tep_session_name())), $navigation->snapshot['mode']);

$navigation->clear_snapshot();

$link = $origin_href;

} else {

$link = tep_href_link(FILENAME_DEFAULT);

}


******************
Thats all

Expand All / Collapse All

Final Solution 30 Apr 2011

[EN]
I tried all the options and none work as needed.

Problems:
1 - the client is identified with nothing in the car... why you have to show the empty car? why not go to the front of the store?
2 - the client is identified having items in the cart... because he has to send the cover of the tent? why not go on the buying process?

The solution here: http://forums.oscommerce.com/topic/237743-login-redirect-to-index-instead-of-previous-page/page__view__findpost__p__1580435


[ES]
He probado todas las opciones y no funciona como es necesario.

Problemas:
1 - el cliente se identifica con el carrito vacío ... ¿por qué tiene que mostrarse el carrito vacío? ¿por qué no se muestra la portada de la tienda?

2 - el cliente se identifica con productos en el carrito... ¿porque se le tiene que enviar la portada de la tienda? ¿por qué no ir al proceso de compra?

La solución aqui: http://forums.oscommerce.com/topic/237743-login-redirect-to-index-instead-of-previous-page/page__view__findpost__p__1580435


reflex-ocasion

Use this method by demoalt 29 Jul 2010
Use this contrib on your own risk! 4 May 2010
Login and Return to same page 3 May 2010
Updated full pack 12 Dec 2009
Small Fix: 9 Dec 2009
Fix Error 9 Dec 2009
Login and Return to same page Van Loco Gunther 19 Apr 2005
Login and Return to same page Joma Webdesign 18 Apr 2005

Note: Contributions are used at own risk.