osCmax v2.5 User Manual
Results 1 to 9 of 9

Welcome 'Guest' or 'User'?

This is a discussion on Welcome 'Guest' or 'User'? within the osCmax v2 Customization/Mods forums, part of the osCmax v2.0 Forums category; How does one code the default home page message to greet the viewer either as 'Guest' or by their name? ...

      
  1. #1
    JRR
    JRR is offline
    Member
    Join Date
    Sep 2009
    Location
    Vancouver, BC, Canada
    Posts
    52
    Rep Power
    3


    Default Welcome 'Guest' or 'User'?

    How does one code the default home page message to greet the viewer either as 'Guest' or by their name? This would help folks know that they were actually logged in...

    I see that this was in OSCMax 1.xx:

    Help with greeting statement?

    but can find no obvious reference in 2.x

    Searching the Wiki for "Welcome Guest" and other attempts did not turn up an answer, nor in the docs.

    Suggestions?

  2. #2
    osCMax Development Team
    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    2,678
    Rep Power
    49


    Smile Re: Welcome 'Guest' or 'User'?

    This is standard functionality in osCmax ... although I suspect that it may have been commented out.

    Look in catalog/<your template>/content/index_default.php for :

    Code:
    <?php //php echo tep_customer_greeting(); ?>
    and change it to:

    Code:
    <?php echo tep_customer_greeting(); ?>
    Regards,
    pgmarshall
    _______________________________

  3. #3
    JRR
    JRR is offline
    Member
    Join Date
    Sep 2009
    Location
    Vancouver, BC, Canada
    Posts
    52
    Rep Power
    3


    Default Re: Welcome 'Guest' or 'User'?

    Ah, thanks - that now works.

    For folks information this file is now named index_default.tpl.php and it is located in catalog/templates/fallback/content/

  4. #4
    Lurker
    Join Date
    Oct 2009
    Posts
    2
    Rep Power
    0


    Default Re: Welcome 'Guest' or 'User'?

    OK, but where/how do you format the greeting text (font, color, size)??? There is a format value in the stylsheet.css for the variable info (registered customer name) but not the static greeting text. Yes, languages/english.php contains the actual text verbage, but not the formatting of the text. Is this text a default format in lieu of a stylesheet.css entry? If so, how would I assign a format for this text in the stylesheet.css (or elsewhere)?

  5. #5
    osCMax Development Team
    ridexbuilder's Avatar
    Join Date
    Jul 2008
    Location
    Haggisland
    Posts
    3,014
    Rep Power
    36


    Lightbulb Re: Welcome 'Guest' or 'User'?

    Off-cuff, so to speak
    Code:
    <span class="greeting"><?php echo tep_customer_greeting(); ?></span>
    Then add the greeting class to stylesheet.css
    Hosting plans with installation, configuration, contributions, support and maintenance.

  6. #6
    osCMax Development Team met00's Avatar
    Join Date
    Oct 2005
    Location
    wherever I happen to be at the moment
    Posts
    854
    Blog Entries
    2
    Rep Power
    26


    Default Re: Welcome 'Guest' or 'User'?

    Maybe it's time to add a "basics" section to the wiki with links to tutorials on CSS, PHP, mySQL and jquery.
    so endith the lesson
    <think>sometimes I just sit's and thinks</think>
    "Here you are with a hand full of holes, a thumb up your ass, and a big grin to pass the time of day with." - TWB

  7. #7
    Member
    Join Date
    Sep 2011
    Location
    New Zealand
    Posts
    38
    Rep Power
    0


    Default Re: Welcome 'Guest' or 'User'?

    How do i display the users name in the breadcrumb when they are logged on, i can get customers id but not the name that goes with the id

    <td class="breadcrumb" align="right">&nbsp;<?php echo $customer_id; ?></td>

    any ideas????

  8. #8
    osCMax Development Team
    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    2,678
    Rep Power
    49


    Default Re: Welcome 'Guest' or 'User'?

    Depends on which page you want to add this from. Their account page? What is the purpose of the breadcrumb link? ie. if they click on their customer_id what page would you take them to.

    Perhaps it might be better to simply put a Welcome back xyz somewhere outside the breadcrumb path? Perhaps, in the same bar but aligned right underneath the tabs?

    Regards.
    pgmarshall
    _______________________________

  9. #9
    Member
    Join Date
    Sep 2011
    Location
    New Zealand
    Posts
    38
    Rep Power
    0


    Default Re: Welcome 'Guest' or 'User'?

    hi and thanks pgmarshall for your help, i just wanted to greet the logged on user in a nice space and the breadcrumb looks like the place to put that so anyway after alot of fluffing around i got this to work:

    <td class="breadcrumb" style="font-weight : bold" align="right">&nbsp;<?php echo $customer_first_name; ?></td>

    simple really once you know how.

Similar Threads

  1. Guest Account v 2.0
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 08-23-2008, 04:13 PM
  2. Guest Account v 2.0
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 09-26-2007, 05:11 PM
  3. Welcome Guest and Customner's Name
    By ozstar in forum osCmax v2 Customization/Mods
    Replies: 0
    Last Post: 05-05-2007, 03:02 PM
  4. Welcome Guest and Name missing
    By ozstar in forum osCmax v2 Installation issues
    Replies: 4
    Last Post: 05-05-2007, 02:45 PM
  5. Guest Account v 2.0
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 02-15-2007, 02:06 PM

Bookmarks

Posting Permissions

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