![]() |
After login Stay on Current page
I have a x cart Pro 4.4.2 based store.I have added login link in one of my static page by adding login.php.But after login I want to stay on that current page.Currently after login it goes to cart page if some product added in cart or in home page.
I want to stay current page after login.How to achieve that in 4.4.x version? Thanks to all. |
Re: After login Stay on Current page
You need to modify the login php script and change the redirect to current page instead. There will be at least 2 places in the file to modify - one for if anythign in cart and one if nothing in cart on successful login
|
Re: After login Stay on Current page
Hi Steve,
Thank you for your quick reply.But how to achieve that? What exactly to be change can you help me? Thanks. |
Re: After login Stay on Current page
Yes I can help you with this, contact me at the email in my signature
|
Re: After login Stay on Current page
Hi,
Can you help me here? Thanks. |
Re: After login Stay on Current page
Hi,
Anyone in the forum to solve the issue !!! I want help. Thanks to all. |
Re: After login Stay on Current page
Here's an old code sample for 4.0/4.1 that might get you started:
In include/login.php, replace: PHP Code:
PHP Code:
|
Re: After login Stay on Current page
Quote:
Works great in 4.5.4 -- except it fails on checkout page (OPC w/ajax) What I did: include/login.php find: PHP Code:
replace: PHP Code:
On any page except OPCajax, a link to /login.php goes to /login.php and provides a form. After the customer logs in, customer is redirected to /register.php?mode=update -- exactly what I want. However, if the login process starts on the OPCajax checkout page, the link to login makes a popup -- and then the login happens, but the popup hangs. If the customer closes the popup and reloads the page, the login was successful - Anyone have a suggestion as to how to get this code working with the OPCajax login popup? Thx J |
Re: After login Stay on Current page
Update:
I bailed on OPC and am back using CheckoutOne so I can use this code -- except in CheckoutOne, it redirects the customer to the account page regardless of cart or checkout status. So I need to edit the code to only redirect to account page IF not in checkout or if cart is empty. Any ideas? Thanks. J |
All times are GMT -8. The time now is 04:05 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.