joma Posted April 18, 2005 Share Posted April 18, 2005 Just wondering if anyone is interested in helping me, i want a mod for my login that will send me back to the page before i had to log in. I have forced users to login before they can view product_info.php but when it goes to log in and they log in it sends them back to index.php Which is a pain in the ass, because they lose where they were.. so any help will be appriciated Quote Link to comment Share on other sites More sharing options...
Simmy Posted April 18, 2005 Share Posted April 18, 2005 Just wondering if anyone is interested in helping me, i want a mod for my login that will send me back to the page before i had to log in. I have forced users to login before they can view product_info.php but when it goes to log in and they log in it sends them back to index.php Which is a pain in the ass, because they lose where they were.. so any help will be appriciated <{POST_SNAPBACK}> I don't use accounts so not 100% sure how the redirect works, but you could probably modify the back button code below (replace the existing redirect code) <?php $back = sizeof($navigation->path)-2; if (isset($navigation->path[$back])) { ?> <td class="main" align="right"><?php echo '<a href="' . tep_href_link($navigation->path[$back]['page'], tep_array_to_string($navigation->path[$back]['get'], array('action')), $navigation->path[$back]['mode']) . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td> <?php } ?> Quote Link to comment Share on other sites More sharing options...
Simmy Posted April 18, 2005 Share Posted April 18, 2005 Actually, looking at login.php, it seems to have that kind of code. Is your site live, give me the url so I can see whats happening! Quote Link to comment Share on other sites More sharing options...
Mighty Mike Posted April 19, 2005 Share Posted April 19, 2005 This might be of some help a long topic cheers Quote Link to comment Share on other sites More sharing options...
joma Posted April 19, 2005 Author Share Posted April 19, 2005 the URL for my page is HERE you can have a look Quote Link to comment Share on other sites More sharing options...
Simmy Posted April 19, 2005 Share Posted April 19, 2005 the URL for my page is HERE you can have a look <{POST_SNAPBACK}> Tried the following change to create account success.php line 77ish change <td align="right"><?php echo '<a href="' . $origin_href . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td> //--> to <?php $back = sizeof($navigation->path)-4; if (isset($navigation->path[$back])) { ?> <td align="right"><?php echo '<a href="' . tep_href_link($navigation->path[$back]['page'], tep_array_to_string($navigation->path[$back]['get'], array('action')), $navigation->path[$back]['mode']) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td> <?php } ?> works when you create an account but may need further work to work for returning customers. Try it out and let me know! Brian Quote Link to comment Share on other sites More sharing options...
joma Posted April 19, 2005 Author Share Posted April 19, 2005 it is ok i sorted it out. mod works great, i will pack what i got working as a contribution so if anyone is interested they can download it Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.