I am trying to do the same thing - can you explain what you did to change the link?
Thanks
I am trying to do the same thing - can you explain what you did to change the link?
Thanks
I'm also trying to figure this out. My homepage URL is different from my store URL. I would also like when people click on the logo at the top that they get sent to my main URL. How do I do this?
While I like Zen Cart so far, I don't understand why these things have to be so complicated. I wish it were easier.
HTMLGoddess,
Changing it is straight html anchor code
Copy of tpl_header.php for your template
https://www.zen-cart.com/tutorials/index.php?article=36
Find this and replace with your href:
To: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>
Code:<div id="logo"><?php echo '<a href="http://www.your_domain.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>
Zen-Venom Get Bitten
I'm new to Zen Cart. I've found solutions to most of my questions - there is some fantastic help here. But now I'm stuck. I would like to change the home link from www.mydomain.com/zencart to www.mydomain.com
I've followed the suggestions to edit the tpl_header.php file and I've succeeded to change the link on my banner logo but I would also like to change the Home link in the header and footer of my store.
Also, while I'm at it, I'd like to add a link to the header - how do I do that?
Regards, Andrew
andrewg,
Where is your site??
Zen-Venom Get Bitten
kobra, it's www.gyopar.com/store
Please do not PM for support issues: a private solution doesn't benefit the community.
Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.
Hi Kim.
Thanks for the link but this deals with moving the shop to a different directory.
I am happy with the location of my shop. All I want to do is change the "Home" text link at the top and bottom of my main shop page from www.gyopar.com/store to www.gyopar.com
Andrew
Kobra's advice in post 13 and ccaines' description in post 7 will both do what you want.
You will have to adapt the code a bit to apply it to the footer.
Essentially, you just need to change
HTTP_SERVER . DIR_WS_CATALOG
to
HTTP_SERVER
Last edited by gjh42; 3 Sep 2008 at 05:45 AM.
After reading through this post and many others, I achieved what I wanted. Here's a summary so it's all in one place:
What I wanted:
"Home" in navigation bar, footer and breadcrumbs to point to www.mysite.com, not to www.mysite.com/store
Compromise:
I changed it for navigation bar and footer, but you can't change it in breadcrumbs without editing core files. So instead, I removed the 'home' link from breadcrumbs.
How to do it:
(Assumes you are familiar with the overrides system!)
Make copies of these files for editing:
includes/templates/template_default/common/tpl_header
includes/templates/template_default/common/tpl_footer
(or if you've already edited them get them from your custom overrides folder)
In both files, change this:
. HTTP_SERVER . DIR_WS_CATALOG .
to this:
. HTTP_SERVER .
(pay attention to the dots!)
There is only one instance in tpl_footer; there are two in tpl_header.
Upload the edited files to your custom overrides folder.
That takes care of navigation bar and footer.
Now, to remove 'home' from the breadcrumbs:
Go here:
http://www.zen-cart.com/forum/showthread.php?t=35299
and follow the instruction in Post #8.
NOTE that when he says upload the file to the "overrides" folder, he means that literally. There is already a folder there named "overrides". You are to put the edited file "init_add_crumbs.php" into the directory "includes/init_includes/overrides".
Bookmarks