Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / How do I change link to home?

How do I change link to home?

Views: 30,493

Results 61 to 80 of 80
20 Sep 2009, 2:57 AM
#61
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

How do I change link to home?

You need to change the paths in /includes/configure.php and /admin/includes/configure.php to reflect the new location. See the tutorial: https://www.zen-cart.com/tutorials/index.php?article=122

20 Sep 2009, 5:37 AM
#62
dragonfibers avatar

dragonfibers

New Zenner

Join Date:
Sep 2009
Posts:
3
Plugin Contributions:
0

Re: How do I change link to home?

Thanks. Was able to muddle my way through it with the tutorial and help with a friend who has zencart setup in a similar shop format. I definitely have a lot to learn.

15 Oct 2009, 3:12 PM
#63
ohsnyder avatar

ohsnyder

New Zenner

Join Date:
Sep 2009
Location:
Pasadena, MD
Posts:
12
Plugin Contributions:
0

Re: How do I change link to home?

HELP HELP HELP

I have read all of the questions and replies in this thread and cannot find (or understand) the answer to my question.

I don't care about the Home links on the site

My site http://aabeehives.com is live and installed in a folder named zencart.

Right now I have a <meta> redirect to http://aabeehives.com/zencart so customers only have to type aabeehives.com to reach the store. **How can I fix that so the store opens with aabeehives.com and not have to use a redirect to /zencart? ** :censored:

15 Oct 2009, 3:22 PM
#64
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: How do I change link to home?

You need to move your installation to the root of your domain (/public_html/ or whatever is in your hosting filepaths) and change the configure.php files to reflect the new location, as in post 61.

15 Oct 2009, 4:11 PM
#65
ohsnyder avatar

ohsnyder

New Zenner

Join Date:
Sep 2009
Location:
Pasadena, MD
Posts:
12
Plugin Contributions:
0

Re: How do I change link to home?

The current structure I see is:

/home/aabeehiv/public_html/zencart

How far up do I move everything in the zencart folder?

15 Oct 2009, 4:13 PM
#66
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: How do I change link to home?

Everything that is currently in the /zencart/ folder would go in the /public_html/ folder.

15 Oct 2009, 4:14 PM
#67
ohsnyder avatar

ohsnyder

New Zenner

Join Date:
Sep 2009
Location:
Pasadena, MD
Posts:
12
Plugin Contributions:
0

Re: How do I change link to home?

Thanks for the quick reply. Hope all waorks !

20 Oct 2009, 10:19 PM
#68
acutouch avatar

acutouch

New Zenner

Join Date:
May 2009
Posts:
8
Plugin Contributions:
0

Re: How do I change link to home?

Sorry, I go to a wrong place

26 Dec 2009, 9:17 AM
#69
nathon avatar

nathon

New Zenner

Join Date:
Dec 2009
Posts:
6
Plugin Contributions:
0

Re: How do I change link to home?

ccaines:

I found the perfect solution.

Change the header title in includes/languages/english/YOUR TEMPLATE/header.php (i.e define('HEADER_TITLE_CATALOG', 'your new header title');)

Add a new header title (i.e define('HEADER_TITLE_HOME_PAGE', 'Home');) to replace the modified header title.

Add a new link to includes/templates/YOUR TEMPLATE/common/tpl_header.php (i.e. <li><?php echo '<a href="' . HTTP_SERVER . '">'; ?> <?php echo HEADER_TITLE_HOME_PAGE; ?></a></li>)

This new link replaces the old "Home" header title with a new defined variable modified in header.php.

Notice the href points to HTTP_SERVER.

ZEN uses HTTP_SERVER and DIR_WS_CATALOG to create the link paths. This makes it easy for anyone to modify these links in an elegant way. Just add or remove these variables as needed.

We love ZEN.

PERFECT REPLY:clap::clap:

30 Dec 2009, 1:05 AM
#70
wombleau avatar

wombleau

New Zenner

Join Date:
Dec 2009
Posts:
2
Plugin Contributions:
0

Re: How do I change link to home?

Hi
i have change my logo to point to my home url
can some please tell how to get this to open a new tab/window
instead of opening it in the tab/window that it is in

cheers
wombleau

30 Dec 2009, 2:11 PM
#71
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: How do I change link to home?

Add
target="_blank"
to the <a href code.
For example, change```php

<?php echo '<a href="' . HTTP_SERVER . '">'; ?> <?php echo HEADER_TITLE_HOME_PAGE; ?>

tophp

<?php echo '<a href="' . HTTP_SERVER . '" target="_blank">'; ?> <?php echo HEADER_TITLE_HOME_PAGE; ?>
31 Jan 2010, 12:12 PM
#72
wombleau avatar

wombleau

New Zenner

Join Date:
Dec 2009
Posts:
2
Plugin Contributions:
0

Re: How do I change link to home?

sorry i am not getting the reference as my code looks different

my code reads as

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

what and where should i add code so it opens in a new tab?window

Thanks
Womble

31 Jan 2010, 5:07 PM
#73
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: How do I change link to home?

wombleau:

sorry i am not getting the reference as my code looks different
What ypu posted appears to be a view of your parsed page source and not file code
Find and/or make a copy for your template of /includes/languages/english/YOUR TEMPLATE/header.php and then follow gjh42's post on alteration

1 Feb 2010, 6:42 PM
#74
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: How do I change link to home?

It is the file code, but has had the domain hard-coded in place of the dynamic home URL composition. The

<?php echo '<a href="http://domain.com.au">' . zen_image( should look more like <?php echo '<a href="' . HTTP_SERVER . '" target="_blank">' . zen_image(
4 Feb 2011, 6:52 PM
#75
brenwa avatar

brenwa

New Zenner

Join Date:
Aug 2010
Posts:
1
Plugin Contributions:
0

Re: How do I change link to home?

Here is how to change the home link to a specific url

This string was a bit of a mess in trying to find a straight forward answer. The info is here but not for changing it to a specific url, for those of you who need that (this is a modification of post #34 from bobdog)

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://www.yourdomain.com/whatever.html"

in my header file: on line 34 (and again on line 53 -- IF you also want to change the link on the logo graphic)

from this (entire line provided for context)

<li><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><span><?php echo HEADER_TITLE_CATALOG; ?></span></a></li> to this: <li><?php echo '<a href="http://www.yourdomain.com/whatever.html">'; ?><span><?php echo HEADER_TITLE_CATALOG; ?></span></a></li>

(pay attention to the single quotes that have have been removed, and the double quotes have been left in place...that will change the HOME link to whatever url you like)

There is only one instance of: "' . HTTP_SERVER . DIR_WS_CATALOG . '"
in tpl_footer; there are two in tpl_header.

22 Apr 2014, 7:42 PM
#77
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: How do I change link to home?

Which Home link? There can be more than one on a page. Seeing your site live will help us advise correctly.

In general, you will want to change HTTP_SERVER . DIR_WS_CATALOG to HTTP_SERVER in whatever file is appropriate to the situation.

23 Apr 2014, 12:01 AM
#78
milagromac avatar

milagromac

New Zenner

Join Date:
Jul 2012
Posts:
10
Plugin Contributions:
0

Re: How do I change link to home?

marypotter:

So I think I may have tried this suggestions right, but the only thing that happens is my "home" link changes to "HEADER_TITLE_HOME_PAGE" and it still links to the same place (https://www.example.com/store vs https://www.example.com).

What am I doing wrong?

hi i am trying to do this same thing

http://www.milagrocomputer.com/supercart to

http://www.milagrocomputer.com

i have successfully changed the logo wraper

<!--bof-branding display--> <div id="logoWrapper"> <div id="logo"><?php echo '<a href="http://www.milagrocomputer.com">' . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</a>'; ?> <?php if (HEADER_SALES_TEXT != '' || (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2))) { ?> <div id="taglineWrapper"> <?php

i am having touble with the navigation Wrapper part.

still points to milagrocomputer.com/supercart

<div id="navMainWrapper"> <div id="navMain"> <ul class="back"> <li><?php echo '<a href="http://www.milagrocomputer.com">'; ?><?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

thanks please help

art

23 Apr 2014, 4:39 AM
#79
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: How do I change link to home?

It works correctly for me. Maybe you need to clear your browser cache...

17 May 2015, 4:34 PM
#80
donutman avatar

donutman

New Zenner

Join Date:
Apr 2015
Location:
Virginia, USA
Posts:
6
Plugin Contributions:
0

Re: How do I change link to home?

Thanks for the information. It was exactly what I was looking for.