Forums / Templates, Stylesheets, Page Layout / How to Make the LOGO link point to the website home page in parent folder.

How to Make the LOGO link point to the website home page in parent folder.

Views: 765

Results 1 to 2 of 2
5 Jan 2016, 3:15 PM
#1
lynbor avatar

lynbor

New Zenner

Join Date:
Sep 2004
Location:
Iowa
Posts:
93
Plugin Contributions:
0

How to Make the LOGO link point to the website home page in parent folder.

I did find a very similar thread about this that was closed. But I thought a new thread about this specific question might be beneficial to more than just me.

So I have my zen-cart installed in a subfolder ../store And I'm getting complaints from customers that they can't get back to my website home page once they have selected to enter the online store. Even though I named a box "Important Link" with a choice that titled "Website Home Page" and forced the box to be the top most box on all pages of the shopping cart. LOL.. It falls back to people expecting the company logo to be a link to the website home page. (Just FYI, I'm using the HOPE template from Zen4Me) Having been a long time ZC user I'm very much against doing any customizing that could be overwritten by upgrading my ZC install. Especially since I know I'm getting close to being forced to upgrade being on such an older version still. SO, my question to those who know the ZC setup infinitely better than I... :-)

How can I make the LOGO of my ZC link to the index.html file in the parent folder from my store? (https://www.mydomain.com/index.html) And hopefully without altering any ZC files. (I'm OK with altering template files)

Oh My! I think I answered my own question here.

In my /includes/templates/<template_name>/common folder is a file named tpl_header.php and inside that file is a section that is...

            <!-- EDIT/INSERT YOUR LOGO BELOW --> 
                        <div id="zm_logo">
                        <div class="zm_logo_font">
                            <a href="<?php echo zen_href_link(FILENAME_DEFAULT); ?>" title="<?php echo STORE_NAME;?>">
                                <img src="<?php echo DIR_WS_TEMPLATE_IMAGES;?>logo.png" />
                            </a>    
                        </div>
                        </div>
                        
            <!-- END LOGO -->   

I changed it to be this

 <!-- EDIT/INSERT YOUR LOGO BELOW --> 
                        <div id="zm_logo">
                        <div class="zm_logo_font">
                            <a href="http://mydomain.com" title="My Company Name Home Page">
                                <img src="<?php echo DIR_WS_TEMPLATE_IMAGES;?>logo.png" />
                            </a>    
                        </div>
                        </div>
                        
            <!-- END LOGO -->   

And after testing that in fact did work. I may have to promote myself to answering questions here instead of asking them. LOL

Thanks for looking and my problem and my solution. If you have a more elegant or alternate method for solving this problem I welcome your comments.

elltx.com ELLTX Computer Services
hostingwithservice.com Designing Results Hosting Services
designingresults.com Designing Results Web Design Services

5 Jan 2016, 9:04 PM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: How to Make the LOGO link point to the website home page in parent folder.

Unfortunately the more "elegant" solution would probably take a lot of work. Ideally, since you're in business to make money, everything on you're "site" would be served up through ZC and therefore the "homepage" would still be the root of your site as well as just one more step off point to make money.

Otherwise, if you wanted to maintain your template "server location" proof, if instead of typing in the URI to your site, if you used a check of $request_type ='SSL' you could echo HTTPS_SERVER or HTTP_SERVER respectfully thus if you use the template on another domain name then it will always go back to what is defined in includes/configure.php and use the portability of ZC to ts advantage rather than having to find where all the hardcoded links are within your template/files.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...