Results 1 to 10 of 12

Hybrid View

  1. #1
    Join Date
    Sep 2011
    Posts
    43
    Plugin Contributions
    0

    Default How to Change "Home" to a different URL?

    V 1.39

    I've searched and searched the forums and tutoirals, but still need help.

    How do you change the "home" on the top left corner of the zencart store to a different URL?
    Of course this would also change the "home" in the footer?

    I would like the header and footer "home" to go to my main site and not the home of the store.

    I have a logo in the top and bottom of the middle section of the store that takes you to the home of the store.

    I really do not need 4 links on every page to go to the home page of the store.

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

    Default Re: How to Change "Home" to a different URL

    Actually, you would need to change the header and footer Home links individually. They use Zen Cart's HTTP_SERVER and DIR_WS_CATALOG constants which you cannot alter without breaking the store. You can easily change the link code to use just HTTP_SERVER which will point to the base domain URL.

    Edit /includes/templates/your_template/common/tpl_header.php and tpl_footer.php.
    PHP Code:
        <li><?php echo '<a href="' HTTP_SERVER DIR_WS_CATALOG '">'?><?php echo HEADER_TITLE_CATALOG?></a></li>
    PHP Code:
        <li><?php echo '<a href="' HTTP_SERVER '">'?><?php echo HEADER_TITLE_MAIN_SITE?></a></li>
    Then add a define to /includes/languages/your_template/english.php like
    PHP Code:
    define('HEADER_TITLE_MAIN_SITE''Main Home'); 

  3. #3
    Join Date
    Jan 2012
    Posts
    15
    Plugin Contributions
    0

    Default Re: How to Change "Home" to a different URL?

    So just to clarify: I should replace the first PHP code (in your reply) to read like the second PHP code, doing this in both the tpl_header.php and tpl_footer.php files? And then I should add the 'HEADER_TITLE_MAIN_SITE' PHP code to the english.php file?? Two questions:
    (1) *Exactly* where within the english.php file would I add the new define line?
    (2) My includes/languages only includes one template folder called classic, and it only contains an empty.txt file. Does that mean that I can't make the change to the home link URL described in this thread?

    Please advise. Thank you! :)

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

    Default Re: How to Change "Home" to a different URL?

    Yes.
    1) Add the define anywhere convenient, as long as it's between <?php ?> tags and not inside another define or a comment.
    2) Any place you see a /classic/ folder, you can make a /your_template/ folder next to it. Copy the file (in this case /includes/languages/english.php) to /includes/languages/your_template/english.php and make your edits.

  5. #5
    Join Date
    Feb 2011
    Posts
    73
    Plugin Contributions
    0

    Default Re: How to Change "Home" to a different URL?

    Hi
    I having trouble with a simple transfer of a site into another domain. I want to have two sites work on the same server. the old site domain is www.flproducts.gr which I dont want to delete offcourse. Now the new one is www.pelagosmarine.gr.
    I'm writing all the steps that I have been doing until now.
    1) I downloaded the www.flproducts.gr site contents with the database as a backup.
    2) I changed the configuration files both in admin/includes and includes.
    3) Then I changed the sql file the SQL command to
    DROP DATABASE `pelagos`;
    CREATE DATABASE `pelagos` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
    USE `pelagos`;
    by simply changing the name of the database name because they cannot have the same db_name as they both are in the same server.
    4) then I transfered the backup into the new dir and then I import the sql file through phpmyadmin. And the new site does not seems to work properly please see www.pelagosmarine.gr.

    Please tell me what am I doing wrong here? It seems to be something wrong with the database but I cannot trace it.

  6. #6
    Join Date
    Jan 2012
    Posts
    15
    Plugin Contributions
    0

    Default Re: How to Change "Home" to a different URL?

    The thing that's confusing me is that the only template I've ever used is classic (I've not dared to incorporate a different template into my site settings). I'm using the original green default template that's standard for all new Zen Cart users. So I don't know why this folder only contains an empty text file when it apparently should already contain this english.php file. Hmmm...

 

 

Similar Threads

  1. How do you change the breadcrumb from "Home" to "Storefront"
    By alterego55 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 5 Oct 2010, 09:06 PM
  2. How to change "Submit" button Properties to different url?
    By actorxfactor in forum Templates, Stylesheets, Page Layout
    Replies: 27
    Last Post: 2 Jun 2009, 06:21 PM
  3. Point breadcrumbs "Home" link to different URL
    By DivaVocals in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 20 Oct 2008, 08:24 PM
  4. How do I change the url for the "Home" links?
    By Phooie in forum General Questions
    Replies: 2
    Last Post: 9 Jul 2008, 09:46 PM

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