Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Mar 2011
    Posts
    5
    Plugin Contributions
    0

    Default Change Header Logo Link

    Hey Everyone!

    I'm having a bit of an issue. I'm trying to set-up the header/logo image to link to an external page. I'm pretty sure it's located in the tpl_header file, specifically in the code listed below.

    Code:
    <div id="logo"><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</a>'; ?></div>
    I tried just adding the URL in the href line, but it doesn't seem to be working.

    Does anyone have any other suggestions?

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Change Header Logo Link

    It would be better to add another link versus one that takes them out of your cart...

    But that is the line for your link on the logo

    Try editing this in a copy for your template to
    Code:
    <div id="logo"><?php echo '<a href="Your_link_here">' . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</a>'; ?></div>
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Change Header Logo Link

    People generally expect to click on a site's logo to go to its homepage. If it leads somewhere else entirely, they are likely to be confused, and may well not come back to your store to continue shopping.

  4. #4
    Join Date
    Oct 2010
    Posts
    86
    Plugin Contributions
    0

    Default Re: Change Header Logo Link

    Not to hijack this thread, but where is this located to be able to add a link to the image at the top of a page(to bring you back to the home page)?

    Thanks

  5. #5
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Change Header Logo Link

    Not to hijack this thread, but where is this located to be able to add a link to the image at the top of a page(to bring you back to the home page)?
    See OP's post #1
    Zen-Venom Get Bitten

  6. #6
    Join Date
    Oct 2010
    Posts
    86
    Plugin Contributions
    0

    Default Re: Change Header Logo Link

    Quote Originally Posted by kobra View Post
    See OP's post #1
    Yes, I saw his post but I was hoping for a little more direction on where it is located. I am not as well versed in this stuff as some others are.

    Thanks

  7. #7
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Change Header Logo Link

    Quote Originally Posted by spleify
    was hoping for a little more direction on where it is located. I am not as well versed in this stuff as some others are.
    tpl_ files are default files and only copies for your template structure should be edited/altered

    tpl's are in /includes/templates/template_default and one of the directories contained within it
    https://www.zen-cart.com/tutorials/i...hp?article=346
    https://www.zen-cart.com/tutorials/index.php?article=36
    Zen-Venom Get Bitten

  8. #8
    Join Date
    Mar 2011
    Posts
    5
    Plugin Contributions
    0

    Default Re: Change Header Logo Link

    Sorry, I chose the wrong word. I didn't mean external page, I meant re-direct to another page on the site.

    Thanks for the help everyone. But when I add an href link to that line, it doesn't seem to be working. Here's a copy of what I have. It looks like it should run with no problem, but nothing changes.

    Code:
    <div id="logo"><?php echo '<a href="http://example.com">' . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</a>'; ?></div>
    Any thoughts?

  9. #9
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Change Header Logo Link

    "nothing changes"? Do you mean that the original logo stays as is? What do you see in view source when you add that?

  10. #10
    Join Date
    Mar 2011
    Posts
    5
    Plugin Contributions
    0

    Default Re: Change Header Logo Link

    Sorry about that. I mean that when I change that line by adding a link, the change isn't being accepted. Right now, by default the logo links to the shop's homepage, but I would like it to link to a different page. However, when I add a link to the aforementioned piece of code, the logo's link doesn't change to the new URL that i've specified.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Header Logo link
    By Euroguy66 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 21 Jan 2009, 03:26 PM
  2. Can't get rid of blank image/link after logo/header change
    By bakdoor in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 27 Sep 2008, 05:41 AM
  3. Header Logo Link Change
    By sellfourless in forum Installing on a Windows Server
    Replies: 12
    Last Post: 8 Mar 2007, 07:00 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