Lisa
|
|
« on: December 12, 2011, 11:29:07 PM » |
|
How can I redirect to the my account area after login?
|
|
« Last Edit: December 13, 2011, 09:42:32 PM by Lisa »
|
Logged
|
|
|
|
admin
|
|
« Reply #1 on: December 13, 2011, 01:28:00 PM » |
|
Hi Lisa,
This feature is not available in the current version, a customization is needed, follow these steps:
1. Edit "fbcbridge.php" file 2. Search for "window.location.reload()" (should be LINE 228) 3. Replace "window.location.reload();" with "window.location = 'YOUR_REDIRECT_URL_HERE';" (including quotes!) 4. Set Instant SignON to OFF in module configuration.
Best regards.
|
|
« Last Edit: December 13, 2011, 07:07:14 PM by admin »
|
Logged
|
|
|
|
Lisa
|
|
« Reply #2 on: December 13, 2011, 02:10:28 PM » |
|
But doesn't that part of the code refer to logout - the function is: function handleFBLogout
I have already managed to implement a redirection there, keeping instant sign on turned On.
Surely I need to add something similar to the next function: function handleFBLogin in order to redirect after logging IN
|
|
« Last Edit: December 13, 2011, 05:58:44 PM by Lisa »
|
Logged
|
|
|
|
Lisa
|
|
« Reply #3 on: December 13, 2011, 03:27:01 PM » |
|
I really need to get this sorted since at the moment after logging in, the user must refresh the page to be told they are now logged in and then manually redirect to the my account page, which is really not acceptable and will only frustrate people.
I understahd that instant signon is supposed to deal with this, but while I can see this is refference in the logout function, I cannot see any referrence to it in function handleFBLogin, which appears to mean it makes no difference on log in, which is surely when it is needed most.
|
|
« Last Edit: December 13, 2011, 05:58:54 PM by Lisa »
|
Logged
|
|
|
|
admin
|
|
« Reply #4 on: December 13, 2011, 06:59:27 PM » |
|
Hi Lisa,
Sorry for the confusion, i have updated the previous post accordingly. Still Instant SignON should be OFF, because there is no point in overloading the process if there will be a refresh anyway.
Best regards.
|
|
|
Logged
|
|
|
|
Lisa
|
|
« Reply #5 on: December 13, 2011, 07:14:23 PM » |
|
Yes, I had actually found that and redirection now works when I click refresh. However, I am still having to click refresh - I think it is because the onClick for fb:login-button seems to have no effect (when I remove it from the button code, it makes no difference - I can still log in and then hit refresh to update the page and be redirected to my-account.php!)
Why is this onclick event not working?
|
|
|
Logged
|
|
|
|
Lisa
|
|
« Reply #6 on: December 13, 2011, 07:26:55 PM » |
|
Dear god, that was hard work! After ar*ing around with this ALL day, it seems that simply changing it to onlogin rather than onclick does the trick!
|
|
|
Logged
|
|
|
|
Lisa
|
|
« Reply #7 on: December 13, 2011, 07:54:25 PM » |
|
Super, I'm on a roll. I also have the button on the authorisation page and wanted to redirect to the my account page or the checlout depending on how the user arrived at the page - simplly done by using window.back() instead of window.location
|
|
|
Logged
|
|
|
|
|