Is there a way to create an after register/login page? Currently it just goes to the previous page you were on.
Thanks!
Hello!
Unfortunately, it's not a default functionality. Custom development required.
Best regards, Alt-team
Figured as much. Does anyone know where I could start?
You'll be hardpressed to find better coders than Alt-Team
Ive been working on the auth.php file but haven't had any success. Any Ideas? Ill feel a lot better working on it if I know I'm in the right place.
Still stumped on this. Can someone point me in the right direction?
worked at cs-cart 2.2.4
file: /controllers/common/auth.php
find code (in 2.2.4 line 150 )
if (defined('AJAX_REQUEST') && Registry::get('settings.General.checkout_style') != 'multi_page') {
$redirect_url = "checkout.checkout";
} elseif (!empty($_REQUEST['return_url'])) {
$redirect_url = $_REQUEST['return_url'];
}
replace with:
if (defined('AJAX_REQUEST') && Registry::get('settings.General.checkout_style') != 'multi_page') {
$redirect_url = "checkout.checkout";
} elseif (!empty($_REQUEST['return_url'])) {
$_REQUEST['return_url'] = '/anypage.html';
$redirect_url = $_REQUEST['return_url'];
}
change '/anypage.html' to any page you like.
after login it will redirect user to that page;
if it won't be working for you. try to insert
$redirect_url = '/anypage.html';
some lines after if()elseif() block
Why not just add a controller that will reset the return_url REQUEST to what you want and NOT modify standard code?
Create addons/my_changes/controllers/customer/auth.pre.php (if it does not exist).
Add content like:
if( $mode == 'login' && isset($_REQUEST['return_url']) && $_SERVER['REQUEST_METHOD'] == 'POST' )
$_REQUEST['return_url'] = 'whatever url you want to force'
return array(CONTROLLER_STATUS_OK);
Never causes an upgrade conflict.
Thanks guys! Ill give it a try!
Worked great guys Thanks.
BTW i added your code and the information from this thread: [url=“Registration Submit Redirect HELP - Hints & Modifications - CS-Cart Community Forums”]Registration Submit Redirect HELP - Hints & Modifications - CS-Cart Community Forums to get the effect I was looking for.
Thanks a lot!