Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

QTPro - redirects to login.php on Add


Recommended Posts



I have installed QTpro and it is working fine in all respects but this.


In the stock area for any product (page admin/stock.php) when I change the stock quantities and click on the ADD button, before it updates them on the screen I get re-directed to the login.php page each time and have to re-enter my password. So on the Get command for this page it is re-directing me and re-requiring my password.


Obviously this is a nightmare when updating stock quantities to keep having to re-enter the username and password.


I can't find where to stop it doing this. On previous installs of oscommerce with QTpro it didn't do this. Any ideas how and where I can change this?


I've been looking in admin/includes/application_top.php but can't seem to work out where it is redirecting to login.php on this particular command on the stock page. I'm not even sure if I'm looking in the right place.


Any help would be greatly appreciated!

Link to comment
Share on other sites

So as far as I've got now is finding that the QTPro installation is the only area in admin that uses the Get method and that is what is prompting the re-direct.


I think some other contributions for admin use the GET method. Have found this problem in the forums a few times, but no answers that stop the re-direct on GET method.


Not sure how to get around this - any ideas?

Link to comment
Share on other sites

I found the solution and as usual with oscommerce its something really simple. In admin/stock.php


about line 214 just before the closing </form> add <?php echo tep_hide_session_id(); ?>


This will stop the GET method interfering with the session id and requiring a new login.


I think it works fine. See code below:


Original (about line 214)



Change to:

       <?php echo tep_hide_session_id(); ?></form></td>

Link to comment
Share on other sites

  • 1 year later...

I found the issue to actually be in my admin/includes/configure.php file, I had it incorrect; though all other admin functions worked, I got the redirect you mention, but read this post and fixed it by doing a default oscommerce install and mirroring the automated configure.php file. Also, see this post



Link to comment
Share on other sites

  • 8 months later...

And another solution is to replace line 163


<td><form action="<?php echo $PHP_SELF;?>" method=get>




<td><form action="<?php echo tep_href_link(FILENAME_STOCK);?>" method=get>





Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile


Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.


For links mentioned in old answers that are no longer here follow this link Useful Threads.


If this post was useful, click the Like This button over there ======>>>>>.

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.

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...