Results 1 to 10 of 10
  1. #1
    Join Date
    May 2008
    Posts
    58
    Plugin Contributions
    0

    Default Link back to main site

    Trying to get a solid link back to the main site that calls zencart in the first place.

    I have a "banner" in the header that has a link attached to it that goes back to the main zencart page. Is there a way to change the link? If so, I can't find it.

    Seems to me there is a file to edit for the header, I know about header.php but is that where to change (or override with hard code) it? It just does not seem so.

    Otherwise, any ideas how to easily link back to the main site?

    Ideas appreciated as always. thank you.

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

    Default Re: Link back to main site

    Too many uses of "main"

    What url are you wanting the link to be and what is the link to your cart?
    Zen-Venom Get Bitten

  3. #3
    Join Date
    May 2008
    Posts
    58
    Plugin Contributions
    0

    Default Re: Link back to main site

    Thanks cobra

    I want the URL to be www.site.com

    and it is www.site.com/cart

    At one time I had a bunch of my own html defining the header design but converted it to a graphic and now I can't remember where the php is that controls that part.

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

    Default Re: Link back to main site

    Withoutseeing you cart site I have to assume that you have not broken the default code.

    Look at a copy for your templsate of /common/tpl_header.php and the highlighted code is the constant used that you will replace with your anchor href text
    Code:
    <div id="logoWrapper">
        <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>
    Zen-Venom Get Bitten

  5. #5
    Join Date
    May 2008
    Posts
    58
    Plugin Contributions
    0

    Default Re: Link back to main site

    Yes. Thank you so very much!

    Hoping to pass it on someday.

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

    Default Re: Link back to main site

    In the specific case of linking back to the home page of a main site in the domain root, you could leave the HTTP_SERVER and just remove the . DIR_WS_CATALOG:
    PHP Code:
    <div id="logoWrapper">
        <div id="logo"><?php echo '<a href="' HTTP_SERVER '">' zen_image($template->get_template_dir(HEADER_LOGO_IMAGEDIR_WS_TEMPLATE$current_page_base,'images'). '/' HEADER_LOGO_IMAGEHEADER_ALT_TEXT) . '</a>'?></div>

  7. #7
    Join Date
    Aug 2004
    Location
    New York City
    Posts
    7,174
    Plugin Contributions
    0

    Default Re: Link back to main site

    Just keep in mind that if someone has been shopping on your site and goes back to the "main" site before completing the transaction (i.e. actually buying anything), his/her session and shopping cart contents could be lost.
    Mary Ellen
    I came; I saw; I Zenned
    Taking over the world... one website at a time
    Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

    Holzheimer
    Fan Odyssey

  8. #8
    Join Date
    Aug 2008
    Posts
    105
    Plugin Contributions
    0

    Default Re: Link back to main site

    Hello
    I just moved my site from a folder to become the main site. So the original path to my zen cart was www.QuiltsOnBroadway.com/zen/

    Now when you type in www.QuiltsOnBroadway.com you get the correct main page.....however when you continue into the site and then click on the logo to go back to the main page...you go back to the main page in the zen folder (I have not removed these files yet until I am certain everything is working correctly) and actually so do all of my links........please help.

    Any help is appreciated!

    Mona
    A totally new zenner and new to php but is liking it

  9. #9
    Join Date
    Aug 2004
    Location
    New York City
    Posts
    7,174
    Plugin Contributions
    0

    Default Re: Link back to main site

    Make sure you've followed all the steps in https://www.zen-cart.com/tutorials/i...hp?article=122 particularly editing the config files.
    Mary Ellen
    I came; I saw; I Zenned
    Taking over the world... one website at a time
    Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

    Holzheimer
    Fan Odyssey

  10. #10
    Join Date
    Aug 2008
    Posts
    105
    Plugin Contributions
    0

    Default Re: Link back to main site

    I thought I had but will double check again
    Thanks
    Mona

 

 

Similar Threads

  1. creating a link from shopping cart back to main website
    By irori in forum Templates, Stylesheets, Page Layout
    Replies: 12
    Last Post: 21 Aug 2012, 12:45 AM
  2. SSL redirects back to main site page
    By DeepSouthFishing in forum General Questions
    Replies: 1
    Last Post: 13 Dec 2007, 03:10 AM
  3. HOME link back to my site?
    By kjoistudios in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 12 Jul 2007, 05:21 PM
  4. Link back to HTML Site
    By orenda in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 16 Oct 2006, 05:49 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