Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 22
  1. #11
    Join Date
    Jan 2008
    Posts
    1,700
    Plugin Contributions
    6

    Default Re: How to add item in the first page of zen cart?

    For us to help you, I think you need to specify exactly where you want this link to be. From your original post, it's clear that you want it somewhere on your home page, but there are many places you can choose to display it. You might want to display it in a sidebox, in the header bar, footer bar, within the main text in the centre column etc etc. Each method requires a slightly different approach. It's hard to explain anything any further without knowing what you want explaining.

  2. #12
    Join Date
    Jan 2008
    Location
    China
    Posts
    144
    Plugin Contributions
    0

    Default Re: How to add item in the first page of zen cart?

    Thanks so much for your message! Yes. I need it to be displayed in the header bar. In the leader bar, there are "Home" and " Log in" right now, I just need to add another one " forum " to that and have that link to our forum link http://www.bendigou.com/forum. However, the problem is that I couldn't find the pages to edit to? And I don't know how to do that with Ez-Pages... Could you give me the help?

  3. #13
    Join Date
    Jan 2008
    Posts
    1,700
    Plugin Contributions
    6

    Default Re: How to add item in the first page of zen cart?

    Ok, EZ Pages can't be used for this.

    You need to find:
    includes\templates\template_default\common\tpl_header.php

    Overide it as:
    includes\templates\your_template\common\tpl_header.php

    In your overide copy, after it says..

    PHP Code:
    <li><a href="<?php echo zen_href_link(FILENAME_LOGIN'''SSL'); ?>"><?php echo HEADER_TITLE_LOGIN?></a></li>
    <?php } } ?>
    Add..

    PHP Code:
    <li><a href="http://www.bendigou.com/forum">Forum</a></li

  4. #14
    Join Date
    Jan 2008
    Location
    China
    Posts
    144
    Plugin Contributions
    0

    Default Re: How to add item in the first page of zen cart?

    Quote Originally Posted by Steven300 View Post
    Ok, EZ Pages can't be used for this.

    You need to find:
    includes\templates\template_default\common\tpl_header.php

    Overide it as:
    includes\templates\your_template\common\tpl_header.php

    In your overide copy, after it says..

    PHP Code:
    <li><a href="<?php echo zen_href_link(FILENAME_LOGIN'''SSL'); ?>"><?php echo HEADER_TITLE_LOGIN?></a></li>
    <?php } } ?>
    Add..

    PHP Code:
    <li><a href="http://www.bendigou.com/forum">Forum</a></li
    Thanks a lot for that information! That is one more step towarding solving this problem! However, I couldn't find this file in my website. I installed zen cart from hostmonster.com and its version is 1.3.8a. however, I couldn't find the folder of templates after includes. Could you take a look and are there any other people who have experience on this? Thanks a lot in advance and my skype is sunzhoujian.

    ///////////////////////////////////////////////////
    New Installation (1.3.8a)
    Disk space required: 14.52 MB
    Disk space available: 614277.5 MB
    //////////////////////////////////////////////////

  5. #15
    Join Date
    Jan 2008
    Location
    China
    Posts
    144
    Plugin Contributions
    0

    Default Re: How to add item in the first page of zen cart?

    tpl_header .php

    I searched all over the disk, but I still couldn't find the file. Did I miss anything? Or the version changed a lot?

  6. #16
    Join Date
    Mar 2008
    Location
    Cape Town & London (depends on the season)
    Posts
    2,975
    Plugin Contributions
    0

    Default Re: How to add item in the first page of zen cart?

    Without tpl_header.php your zenshop will probably not work. Look in the directory path(s) suggested by Steven300.

    It has to be there.

  7. #17
    Join Date
    Jan 2008
    Location
    China
    Posts
    144
    Plugin Contributions
    0

    Default Re: How to add item in the first page of zen cart?

    Thanks a lot! I checked again, and I found that we didn't download the whole websites. And I found the tpl_header.php file. I downloaded and opened it with Notepad and uploaded again. However, I got error
    message like this. What happened? I noticed that after I made edition
    to the file, the format of file in Notepad changes. Can I use it to edit php file, if not, what would you suggest to use? I am using windows xp right now.

    "Parse error: syntax error, unexpected '{' in /home/nannings/public_html/includes/templates/template_default/common/tpl_header.php on line 1"

  8. #18
    Join Date
    Jan 2008
    Posts
    1,700
    Plugin Contributions
    6

    Default Re: How to add item in the first page of zen cart?

    There's some type of problem with your code. I suggest posting the contents of tpl_header.php so we can check for any mistakes. Remember to wrap it in PHP tags so it's easier to read.

    Notepad should be fine for editing PHP files. After you save the file, just check its properties to see if it's still of the same file type.

    Also, it doesn't look like you're making use of the overide system.

  9. #19
    Join Date
    Jan 2008
    Location
    China
    Posts
    144
    Plugin Contributions
    0

    Default Re: How to add item in the first page of zen cart?

    Here is the tpl_header file, sorry for the late reply and I still didn't get the problem solved. And I really look forward to your help!

    <?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 {



    }

    ?>





    <!--bof-header logo and navigation display-->

    <?php

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

    ?>



    <div id="headerWrapper">

    <!--bof-navigation display-->

    <div id="navMainWrapper">

    <div id="navMain">

    <ul class="back">

    <li><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?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

    } else {

    if (STORE_STATUS == '0') {

    ?>

    <li><a href="<?php echo zen_href_link(FILENAME_LOGIN, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGIN; ?></a></li>

    <?php } } ?>



    <?php if ($_SESSION['cart']->count_contents() != 0) { ?>

    <li><a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a></li>

    <li><a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"><?php echo HEADER_TITLE_CHECKOUT; ?></a></li>

    <?php }?>

    </ul>

    </div>

    <div id="navMainSearch"><?php require(DIR_WS_MODULES . 'sideboxes/search_header.php'); ?></div>

    <br class="clearBoth" />

    </div>

    <!--eof-navigation display-->



    <!--bof-branding display-->

    <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>

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

    <div id="taglineWrapper">

    <?php

    if (HEADER_SALES_TEXT != '') {

    ?>

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

    <?php

    }

    ?>

    <?php

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

    if ($banner->RecordCount() > 0) {

    ?>

    <div id="bannerTwo" class="banners"><?php echo zen_display_banner('static', $banner);?></div>

    <?php

    }

    }

    ?>

    </div>

    <?php } // no HEADER_SALES_TEXT or SHOW_BANNERS_GROUP_SET2 ?>

    </div>

    <br class="clearBoth" />

    <!--eof-branding display-->



    <!--eof-header logo and navigation display-->



    <!--bof-optional categories tabs navigation display-->

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

    <!--eof-optional categories tabs navigation display-->



    <!--bof-header ezpage links-->

    <?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 } ?>

    <!--eof-header ezpage links-->

    </div>

    <?php } ?>




    Quote Originally Posted by Steven300 View Post
    There's some type of problem with your code. I suggest posting the contents of tpl_header.php so we can check for any mistakes. Remember to wrap it in PHP tags so it's easier to read.

    Notepad should be fine for editing PHP files. After you save the file, just check its properties to see if it's still of the same file type.

    Also, it doesn't look like you're making use of the overide system.

  10. #20
    Join Date
    Jan 2008
    Posts
    1,700
    Plugin Contributions
    6

    Default Re: How to add item in the first page of zen cart?

    The code you posted has double spacing. This is likely to be the cause of the problem. You need to get your last backup of the file (or a fresh version) and add the code I suggested above using a good text editor.

    Try using Notepad++
    http://notepad-plus.sourceforge.net/uk/site.htm

 

 
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. v153 Blank Page when I add an item to the cart
    By khirsdt in forum General Questions
    Replies: 1
    Last Post: 18 Jan 2015, 07:53 PM
  2. Not one single FAQ on how to add a module (for first-time zen cart users)
    By turnerjk1 in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 22 Mar 2009, 10:32 PM
  3. blank page after adding an item to the cart / first step checkout....
    By MatchManhattan in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 17 Mar 2008, 09:50 PM
  4. Replies: 0
    Last Post: 16 Jan 2007, 09:32 AM
  5. Replies: 4
    Last Post: 30 Oct 2006, 12:59 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