Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2009
    Posts
    48
    Plugin Contributions
    0

    Default Header login woes

    Hi all, firstly thanks for any help to anyone that can help me with this issue.

    Basically what I'd like to do is have my login box in my header (Already have it placed and it works) but once the user has logged in I would like the login box to dissapear and in it's place appear a logout button, your account link and maybe a your cart link/button aswell (Like what happens in php forums).

    I've fiddled around with a few things and nothings worked quite the way I'd like it to or else it's unsuitable for my clients needs.

    Website is currently hosted here at www.intricate-designs.co.nz/kamelotkidz whilst I prepare the site and get things ready for shipping it over to it's actual host etc.

    Thanks again.

  2. #2
    Join Date
    Mar 2007
    Location
    AZ
    Posts
    1,911
    Plugin Contributions
    2

    Default Re: Header login woes

    One error noted line 1133 of your stylesheet
    .greeting{ display::none;}
    Do you have a test customer login we can use to see what happens once customer is logged in?

    Tina

  3. #3
    Join Date
    Jul 2009
    Posts
    48
    Plugin Contributions
    0

    Default Re: Header login woes

    Quote Originally Posted by charmedbytina2 View Post
    One error noted line 1133 of your stylesheet

    Do you have a test customer login we can use to see what happens once customer is logged in?

    Tina
    Thanks for the error note, all fixed ;)

    test customer is as below.

    login: racktor[at]hotmail.com
    password: guest

    As you'll notice once logged in you can't find a link to the my account or shopping cart or a logout button, I want the login area to disapear and those things to appear if possible.

    Thanks
    Intricate-Designs for all your website and graphic needs.

  4. #4
    Join Date
    Mar 2007
    Location
    AZ
    Posts
    1,911
    Plugin Contributions
    2

    Default Re: Header login woes

    Take a look at the tpl_header.php in templates / template_default / common.

    Note the codes for the login - my account - shopping cart, etc...

    Try replicating that coding in the file you have your email -password and the key image located - or merge that coding into the tpl_header.

    Tina

  5. #5
    Join Date
    Jul 2009
    Posts
    48
    Plugin Contributions
    0

    Default Re: Header login woes

    Quote Originally Posted by charmedbytina2 View Post
    Take a look at the tpl_header.php in templates / template_default / common.

    Note the codes for the login - my account - shopping cart, etc...

    Try replicating that coding in the file you have your email -password and the key image located - or merge that coding into the tpl_header.

    Tina
    I owe you one mate! Now all I have to do it alter the logout link to be an image and she's working the way I want, this is what I did below.

    Original Header login code from barebones zencart install
    PHP Code:
     <ul class="back">
        <li><?php echo '<a href="' HTTP_SERVER DIR_WS_CATALOG '">'?><?php echo HEADER_TITLE_CATALOG?></a></li>
    <?php if ($_SESSION['customer_id']) { ?>
        <li><a href="<?php echo zen_href_link(FILENAME_LOGOFF'''SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF?></a></li>
        <li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT'''SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT?></a></li>
    <?php
          
    } else {
            if (
    STORE_STATUS == '0') {
    ?>
        <li><a href="<?php echo zen_href_link(FILENAME_LOGIN'''SSL'); ?>"><?php echo HEADER_TITLE_LOGIN?></a></li>
    <?php } } ?>

    <?php if ($_SESSION['cart']->count_contents() != 0) { ?>
        <li><a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART'''NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS?></a></li>
        <li><a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING'''SSL'); ?>"><?php echo HEADER_TITLE_CHECKOUT?></a></li>
    <?php }?>
    </ul>

    My altered code to show login form in header etc

    PHP Code:
    <?php if ($_SESSION['customer_id']) { ?>
                        <a href="<?php echo zen_href_link(FILENAME_LOGOFF'''SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF?></a> | 
                        <a href="<?php echo zen_href_link(FILENAME_ACCOUNT'''SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT?></a> | 
                    <?php
                          
    } else {
                            if (
    STORE_STATUS == '0') {
                    
    ?>
                        <?php echo zen_draw_form('login'zen_href_link(FILENAME_LOGIN'action=process''SSL')); 
                              echo 
    ENTRY_EMAIL_ADDRESS
                              echo 
    zen_draw_input_field('email_address''''size="12" id="login-email-address"'); 
                              echo 
    ENTRY_PASSWORD
                              echo 
    zen_draw_password_field('password''''size="12" id="login-password"'); 
                              echo 
    zen_draw_hidden_field('securityToken'$_SESSION['securityToken']); 
                              echo 
    zen_image_submit(BUTTON_IMAGE_LOGINBUTTON_LOGIN_ALT);
                            
    ?>
                        
                    <?php } } ?>
                    
                    <?php if ($_SESSION['cart']->count_contents() != 0) { ?>
                        <a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART'''NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS?></a> | 
                        <a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING'''SSL'); ?>"><?php echo HEADER_TITLE_CHECKOUT?></a>
                    <?php }?>
    She now works a right charm, thanks alot again you pointed me in the right direction and let me think about things without doing it all for me, which makes me learn more, thanks mate
    Intricate-Designs for all your website and graphic needs.

 

 

Similar Threads

  1. v150 woes with header logo and tagline
    By lifesblackblood in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 13 Jul 2012, 02:39 PM
  2. Want the Login link in header to take customer to Secure Login page
    By mom2da3ks in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 10 Feb 2011, 04:50 PM
  3. Picture Woes
    By UrbanFool in forum General Questions
    Replies: 2
    Last Post: 30 Mar 2008, 09:09 PM
  4. Admin Login Woes
    By blacktie in forum Installing on a Windows Server
    Replies: 0
    Last Post: 18 Apr 2007, 04:27 PM
  5. Coupon Woes
    By tammy_kenny in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 2
    Last Post: 29 Aug 2006, 11:04 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg