Results 1 to 3 of 3
  1. #1
    Join Date
    May 2008
    Posts
    20
    Plugin Contributions
    0

    Default Call Customer Name in Header

    I am trying to mimic a "Hi, [name]" at the top of my page. I'll explain...

    When a guest comes to my site, I would like it to say:
    "Hi, Guest. Please register or login."
    The "register or login" linked to the login/registration page.

    Then when someone logs in, I would like it to change to:
    "Hi, [First Name]."

    I suck at php, but this is what I constructed so far. Don't laugh:

    Hi,
    PHP Code:
    <?php if ($_SESSION['customer_id']) { ?>
        <?php echo $cust->fields['customers_firstname']; ?>
        <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 } } ?>

  2. #2
    Join Date
    May 2008
    Posts
    20
    Plugin Contributions
    0

    Default Re: Call Customer Name in Header

    Is this impossible to do?

  3. #3
    Join Date
    Jul 2005
    Posts
    537
    Plugin Contributions
    0

    Default Re: Call Customer Name in Header

    On a brand new install, it already does that on the home page.
    If I recall correctly, enabling/disabling that feature can be done in the admin under Customer Details configuration.

    If you wanted to relocate it to some other place on the site, you'd have to go into the templates and find the existing code, and move it to the appropriate new place.

    I've seen it moved to a sidebar on some sites, for example. I imagine they just copied/moved the code from one template piece to another.

 

 

Similar Threads

  1. v154 Company Name after Customer Name Support
    By dw08gm in forum All Other Contributions/Addons
    Replies: 8
    Last Post: 24 Aug 2015, 07:08 AM
  2. v151 Company Name after Customer Name (instead of before)
    By dw08gm in forum General Questions
    Replies: 3
    Last Post: 8 Oct 2014, 11:42 AM
  3. How to call on a category name?
    By batterychina in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 11 Dec 2010, 05:59 AM
  4. Need to call Customer ID
    By stampsville in forum Managing Customers and Orders
    Replies: 7
    Last Post: 13 Jan 2009, 01:56 AM
  5. Company name vs Customer name at registration
    By sanji in forum Managing Customers and Orders
    Replies: 4
    Last Post: 28 Jan 2008, 10:57 AM

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