Sassenach Posted August 11, 2011 Share Posted August 11, 2011 I'm allowing product comments for registered users only, so I've got a login link in the product comments tab on the products page. For usability reasons, I would like the user to come back to this exact page after logging in. What I found out is that this can be reached by adding a parameter 'back' to the login-url, but: how do I fill this parameter? <a href="{$base_dir}authentication.php?back={CURRENT_PAGE}"> Question is: what do I have to replace CURRENT_PAGE with???? Thanks for your help!!!! Sassenach Link to comment Share on other sites More sharing options...
phrasespot Posted August 14, 2011 Share Posted August 14, 2011 what do I have to replace CURRENT_PAGE with?try smarty.server.REQUEST_URI|escape:'htmlall':'utf-8', so the whole thing reads:<a href="{$base_dir}authentication.php?back={smarty.server.REQUEST_URI|escape:'htmlall':'utf-8'}"> Link to comment Share on other sites More sharing options...
Sassenach Posted October 4, 2011 Author Share Posted October 4, 2011 Thanks for your answer, phrasespot! Unfortunately, when I replace it by the line you proposed, I'm getting this message: Fatal error: Smarty error: [in /myshop/themes/blackwhite/modules/productcomments//productcomments.tpl line 116]: syntax error: unrecognized tag: smarty.server.REQUEST_URI|escape:'htmlall':'utf-8' (Smarty_Compiler.class.php, line 446) in /myshop/tools/smarty_v2/Smarty.class.php on line 1095 Any ideas??? Thanx a lot for your help Sassenach Link to comment Share on other sites More sharing options...
phrasespot Posted October 4, 2011 Share Posted October 4, 2011 Any particular reason you are using smarty 2, if not strictly need, switch the smarty 3 and should be OK. Back Office > Preferences > Use Smarty 2 instead of 3 > No Link to comment Share on other sites More sharing options...
Biwaa Posted January 10, 2013 Share Posted January 10, 2013 Thank you phrasespot for your help (because i used your solution), but i found a mistake : {smarty.server.REQUEST_URI|escape:'htmlall':'utf-8'} need to be : {$smarty.server.REQUEST_URI|escape:'htmlall':'utf-8'} to works with me. I hope it will help other people Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now