Zen Cart Logo
Forums / General Questions / i'd like to replace the home page with a static html page (how though?)

i'd like to replace the home page with a static html page (how though?)

Views: 1,383

Results 1 to 20 of 20
11 Nov 2012, 1:30 AM
#1
icwater avatar

icwater

New Zenner

Join Date:
Nov 2012
Posts:
50
Plugin Contributions:
0

i'd like to replace the home page with a static html page (how though?)

i want all the HOME links within the zen cart site to link back to the index.html as well. is there an easy way to do this?

thanks.

11 Nov 2012, 2:04 AM
#2
kobra avatar

kobra

Black Belt

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

Re: i'd like to replace the home page with a static html page (how though?)

Most hosts will load html preferentially so you can try this and just place a link on that page to your shop /index.php

12 Nov 2012, 4:04 PM
#3
icwater avatar

icwater

New Zenner

Join Date:
Nov 2012
Posts:
50
Plugin Contributions:
0

Re: i'd like to replace the home page with a static html page (how though?)

kobra:

Most hosts will load html preferentially so you can try this and just place a link on that page to your shop /index.php

but how do i get all the links going back to that page from the zen pages?

12 Nov 2012, 5:15 PM
#4
kobra avatar

kobra

Black Belt

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

Re: i'd like to replace the home page with a static html page (how though?)

Find your templates copy of tpl_header.php and this code

<div id="navMain">
    <ul class="back">
    <li><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php echo HEADER_TITLE_CATALOG; ?></a></li>

Change code in red to an href back to your html page
Leave the <li>

12 Nov 2012, 5:28 PM
#5
icwater avatar

icwater

New Zenner

Join Date:
Nov 2012
Posts:
50
Plugin Contributions:
0

Re: i'd like to replace the home page with a static html page (how though?)

<?php

/**

 * Common Template - tpl_header.php

 *

 * this file can be copied to /templates/your_template_dir/pagename<br />

 * example: to override the privacy page<br />

 * make a directory /templates/my_template/privacy<br />

 * copy /templates/templates_defaults/common/tpl_footer.php to /templates/my_template/privacy/tpl_header.php<br />

 * to override the global settings and turn off the footer un-comment the following line:<br />

 * <br />

 * $flag_disable_header = true;<br />

 *

 * @package templateSystem

 * @copyright Copyright 2003-2006 Zen Cart Development Team

 * @copyright Portions Copyright 2003 osCommerce

 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0

 * @version $Id: tpl_header.php 4813 2006-10-23 02:13:53Z drbyte $

 */

?>

<?php



	

  // Display all header alerts via messageStack:

  if ($messageStack->size('header') > 0) {

    echo $messageStack->output('header');

  }

  if (isset($_GET['error_message']) && zen_not_null($_GET['error_message'])) {

  echo htmlspecialchars(urldecode($_GET['error_message']));

  }

  if (isset($_GET['info_message']) && zen_not_null($_GET['info_message'])) {

   echo htmlspecialchars($_GET['info_message']);

} else {



}

?>





<?php

if (!isset($flag_disable_header) || !$flag_disable_header) {

?>



<div id="header">

	<div class="header-inner">

		<div class="main-width">

			<div class="wrapper">

				<div class="logo">

					<!-- ========== LOGO ========== -->

						<a href="<?php echo zen_href_link(FILENAME_DEFAULT);?>"><?php echo zen_image(DIR_WS_TEMPLATE.'images/logo.png'); ?></a>

					<!-- ========================== -->

				</div>

				<div class="right-head">

					<div class="wrapper">

						<div class="search">

							<!-- ========== SEARCH ========== -->

								<?php echo zen_draw_form('quick_find_header', zen_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get');?>

									<div>

								<?php 

									echo zen_draw_hidden_field('main_page',FILENAME_ADVANCED_SEARCH_RESULT);

									echo zen_draw_hidden_field('search_in_description', '1') . zen_hide_session_id();

								?>

								

								<span class="corner"></span>

								<?php echo zen_draw_input_field('keyword', '', 'class="input1"');?>

								<?php echo zen_image_submit ('search.gif', HEADER_SEARCH_BUTTON, 'class="input2" ');?>

								

								

									</div>

								</form>

							<!-- ============================ -->

						</div>

						<div class="navigation">

							<!-- ========== NAVIGATION LINKS ========== -->								

								

							<!-- ====================================== -->

						</div>

					</div>

					<div class="wrapper box2">

					

							<!-- ========== MENU ========== -->

									<?php if (EZPAGES_STATUS_HEADER == '1' or (EZPAGES_STATUS_HEADER == '2' and (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])))) { ?>

										<?php require($template->get_template_dir('tpl_ezpages_bar_header.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_ezpages_bar_header.php'); ?>

									<?php } ?>

							<!-- ========================== -->

						

					</div>

				</div>

			</div>

		</div>

	</div>

</div>



    

	<?php 

		if (HEADER_SALES_TEXT != '' || (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2))) {

			if (HEADER_SALES_TEXT != '') {

	?>

        		<div id="tagline"><?php echo HEADER_SALES_TEXT;?></div>

	<?php

    		}

		}

	?>

   

                

    

<?php } ?>

seems the guy that set this up edited this. does this mean i need to make the changes you mention in the "tpl_ezpages_bar_header.php" ?

12 Nov 2012, 5:29 PM
#6
icwater avatar

icwater

New Zenner

Join Date:
Nov 2012
Posts:
50
Plugin Contributions:
0

Re: i'd like to replace the home page with a static html page (how though?)

p.s. thanks for the help ;)

12 Nov 2012, 5:31 PM
#7
icwater avatar

icwater

New Zenner

Join Date:
Nov 2012
Posts:
50
Plugin Contributions:
0

Re: i'd like to replace the home page with a static html page (how though?)

this is whats in the tpl_ezpages_bar_header.php

<?php

/**

 * Page Template

 *

 * Displays EZ-Pages Header-Bar content.<br />

 *

 * @package templateSystem

 * @copyright Copyright 2003-2006 Zen Cart Development Team

 * @copyright Portions Copyright 2003 osCommerce

 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0

 * @version $Id: tpl_ezpages_bar_header.php 3377 2006-04-05 04:43:11Z ajeh $

 */



  /**

   * require code to show EZ-Pages list

   */

  include(DIR_WS_MODULES . zen_get_module_directory('ezpages_bar_header.php'));

?>

<?php if (sizeof($var_linksList) >= 1) { ?>

<div id="nav-cat"> 

<div id="level1"> 

  <ul> 

    <?php 

	$count = 1;

        foreach($var_linksList as $list) { 

            $link_list = substr($list['link'], strrpos($list['link'], '/')); 

            $link_referer = str_replace('&', '&', $_SERVER['REQUEST_URI']); 

			$link_referer = substr($link_referer, strrpos($link_referer, '/'));

			

			

            if($link_list == $link_referer){ 

                $class = 'selected'; 

            }else{ 

                $class = ''; 

            } 

            if($this_is_home_page && strpos($link_list, 'main_page=index')){ 

                $class = 'selected'; 

            } 

           if(!next($var_linksList)){

				$last = 'last';

			}

			else $last = ''; 

			if($count == 1){

				$first = 'first';

			}

			else $first = ''; 

            echo ' 

                <li class="' . $class . ' '.$last.' '.$first.'"> 

                    <a href="' . $list['link'] . '"> 

						<span class="corner"></span>

                        <span> 

                            <span>' . $list['name'] . '</span> 

                        </span> 

                    </a> 

                </li> 

            '; 

			$count ++;

        } 

       ?> 

  </ul> 

</div>

</div>

</div>

<?php } ?>
12 Nov 2012, 5:36 PM
#8
kobra avatar

kobra

Black Belt

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

Re: i'd like to replace the home page with a static html page (how though?)

Link to the site??

Where do you have a "Home" link

To have clicking your logo take you back to your html page replace this href with yours in the file you posted

<!-- ========== LOGO ========== -->

                        <a href="<?php echo zen_href_link(FILENAME_DEFAULT);?>"><?php echo zen_image(DIR_WS_TEMPLATE.'images/logo.png'); ?></a>
12 Nov 2012, 5:39 PM
#9
kobra avatar

kobra

Black Belt

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

Re: i'd like to replace the home page with a static html page (how though?)

It is not in the tpl_ezpages_bar_header.php file
As ezpages are in the database you would need to change the link reference in
admin > tools > EZ-Pages > edit the header link

12 Nov 2012, 5:41 PM
#10
icwater avatar

icwater

New Zenner

Join Date:
Nov 2012
Posts:
50
Plugin Contributions:
0

Re: i'd like to replace the home page with a static html page (how though?)

12 Nov 2012, 5:43 PM
#11
kobra avatar

kobra

Black Belt

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

Re: i'd like to replace the home page with a static html page (how though?)

That link is not a ZenCart link

12 Nov 2012, 5:45 PM
#12
icwater avatar

icwater

New Zenner

Join Date:
Nov 2012
Posts:
50
Plugin Contributions:
0

Re: i'd like to replace the home page with a static html page (how though?)

oky, that did the trick, but when i click on the logo it still brings me to the zencart home http://globalenginesales.com/index.php?main_page=index where do i change that?

12 Nov 2012, 5:47 PM
#13
icwater avatar

icwater

New Zenner

Join Date:
Nov 2012
Posts:
50
Plugin Contributions:
0

Re: i'd like to replace the home page with a static html page (how though?)

yea the store is disabled at the moment, that's the html front page i'm putting in and the "store" is just some catalog stuff my boss needs online at the moment. just sorta jimmy rigging things, ya know?

12 Nov 2012, 5:47 PM
#14
kobra avatar

kobra

Black Belt

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

Re: i'd like to replace the home page with a static html page (how though?)

You have a Template Monster Template
Search for them here to see all the issues their code causes

12 Nov 2012, 5:48 PM
#15
icwater avatar

icwater

New Zenner

Join Date:
Nov 2012
Posts:
50
Plugin Contributions:
0

Re: i'd like to replace the home page with a static html page (how though?)

this is the sites main page http://globalenginesales.com/index.php?main_page=index just need the logo link to go to the main directory

12 Nov 2012, 5:53 PM
#16
kobra avatar

kobra

Black Belt

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

Re: i'd like to replace the home page with a static html page (how though?)

Template Monster has this hard coded in some file
Outside of ZenCart's structure
Contact them

12 Nov 2012, 5:56 PM
#17
icwater avatar

icwater

New Zenner

Join Date:
Nov 2012
Posts:
50
Plugin Contributions:
0

Re: i'd like to replace the home page with a static html page (how though?)

uhg, well thanks for all the help. :) mind you i didnt install this crap, just cleaning up :p

12 Nov 2012, 6:41 PM
#18
icwater avatar

icwater

New Zenner

Join Date:
Nov 2012
Posts:
50
Plugin Contributions:
0

Re: i'd like to replace the home page with a static html page (how though?)

welp, they are no help. if anyone knows where the link in the logo resides in the code hook a brother up :p

12 Nov 2012, 6:45 PM
#19
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: i'd like to replace the home page with a static html page (how though?)

This is the link in the source of your page:

<div id="level1"> <ul>
            <li class="  first"> 
                <a href="http://globalenginesales.com/"> 
					<span class="corner"></span>
                    <span> 
                        <span>Home</span> 
                    </span> 
                </a> 
            </li>

I would use the Admin - Tools - Developers Tool Kit to search for level1. I'd guess it'll be in tpl_header.php.

12 Nov 2012, 6:55 PM
#20
icwater avatar

icwater

New Zenner

Join Date:
Nov 2012
Posts:
50
Plugin Contributions:
0

Re: i'd like to replace the home page with a static html page (how though?)

changed this

<!-- ========== LOGO ========== -->

						<a href="<?php echo zen_href_link(FILENAME_DEFAULT);?>"><?php echo zen_image(DIR_WS_TEMPLATE.'images/logo.png'); ?></a>

					<!-- ========================== -->

to this

	<!-- ========== LOGO ========== -->

						<a href="http://globalenginesales.com";?>"><?php echo zen_image(DIR_WS_TEMPLATE.'images/logo.png'); ?></a>

					<!-- ========================== -->

seems to work, thats in the tpl header, hope i dont break anything