Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

New Login Mod


joma

Recommended Posts

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

Link to comment
Share on other sites

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

 

 

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
   }
?>

Link to comment
Share on other sites

the URL for my page is

 

HERE

 

you can have a look

 

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

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...