Need help on editing osCommerce...

Discussion in 'PHP' started by jehzlau, Oct 18, 2007.

  1. #1
    I have a site here http://www.gurlash.com built using osCommerce... what I want to do is just transfer the login form to the Left Column..

    But after opening the login.php and copying the table where the form with the username and password field was situated, and pasted it on my column_left.php the login forum won't work... I can click the login image, but there is not response at all.. Do I need to copy some of the PHP scripts inside the login.php file? What should I copy there and include it on my column_left.php inside my includes folder?

    Need help to anybody out there who is familiar with osCommerce. :(
     
    jehzlau, Oct 18, 2007 IP
  2. Lordy

    Lordy Peon

    Messages:
    1,643
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    0
    #2
    i dont see the login at all at your site?

    can you paste what you copied?
     
    Lordy, Oct 18, 2007 IP
  3. Barti1987

    Barti1987 Well-Known Member

    Messages:
    2,703
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    185
    #3
    Please show me the code you have for column_left and column_right files in the main includes folder.

    I will easily figure out what is wrong.

    Peace,
     
    Barti1987, Oct 18, 2007 IP
  4. jehzlau

    jehzlau Active Member

    Messages:
    301
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    73
    #4
    Hi I already figured it out, and I can click the link.. Another problem is.. after I have logged in, I want to Username and Password field to be invisible.. here's my code in column_left.php

    
    <div align="center">
    <div id="RSS">
    <a href="http://feeds.feedburner.com/gurlash">
    <img src="../images/RSS.png" alt="Subscribe to our Feeds" title="Subscribe to our Feeds" border="0">
    </a></div></div>
    
    <?php if (tep_session_unregister('')) { ?>
    
    <body onload="document.login.userName.focus();"> 
    <form action="http://gurlash.com/login.php?action=process" method="post" name="login"> 
    <input type="hidden" name="at" value="null">  
    <input type="hidden" name="continue" value="http://gurlash.com/login.php/">
    <input type="hidden" name="service" value="mail">
    Username:<input type="text" name="email_address" value="" size="18">
    Password:<input type="password" name="password" value="" size="18">
    <input type="submit" value="Sign In">
    </form> 
    
    <?php } ?>
    
    
    <?php
    /*
      $Id: column_left.php,v 1.15 2003/07/01 14:34:54 hpdl Exp $
    
      osCommerce, Open Source E-Commerce Solutions
      http://www.oscommerce.com
    
      Copyright (c) 2003 osCommerce
    
      Released under the GNU General Public License
    */
      
      require(DIR_WS_BOXES . 'shopping_cart.php');
    
      if ((USE_CACHE == 'true') && empty($SID)) {
        echo tep_cache_categories_box();
      } else {
        include(DIR_WS_BOXES . 'categories.php');
      }
    
    
    
      require(DIR_WS_BOXES . 'whats_new.php');
    
    ?>
    
    
    Code (markup):

    I can now log in.. but after logging in.. the username at password field still shows up.. How can I get rid of it? I want the form to show only if the user is logged out :(
     
    jehzlau, Oct 18, 2007 IP
  5. Barti1987

    Barti1987 Well-Known Member

    Messages:
    2,703
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    185
    #5
    
    <?php if (tep_session_unregister('')) { ?>
    
    Code (markup):
    should be:

    
    <?php if(!tep_session_is_registered('customer_id')){ ?>
    
    Code (markup):
    Next time you have a question on oscommerce, search this.

    Peace,
     
    Barti1987, Oct 18, 2007 IP
  6. jehzlau

    jehzlau Active Member

    Messages:
    301
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    73
    #6
    hi azizny, thanks for the answer. That oscommerce forums doesn't give me any answer at all..

    when I use

    <?php if(!tep_session_is_registered('customer_id')){ ?>
    Code (markup):
    I can't see the login form when I am logged out.. I can only see the form when I'm logged in...

    What I want is to see the form when I'm logged out.. T___T

    I hope you get what I mean.. T__T huhuuh.. i badly need ur help :(
     
    jehzlau, Oct 19, 2007 IP
  7. jehzlau

    jehzlau Active Member

    Messages:
    301
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    73
    #7
    jehzlau, Oct 19, 2007 IP
  8. Barti1987

    Barti1987 Well-Known Member

    Messages:
    2,703
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    185
    #8
    You could've removed the ! from the code I gave you to reverse the effect.

    Peace,
     
    Barti1987, Oct 19, 2007 IP
  9. jehzlau

    jehzlau Active Member

    Messages:
    301
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    73
    #9
    oic.. If I'll remove the !, it would be reversed? thanks for the info azizny ^_^
     
    jehzlau, Oct 25, 2007 IP