Results 1 to 8 of 8
  1. #1
    Join Date
    Apr 2011
    Posts
    4
    Plugin Contributions
    0

    Default New link in Header not working

    Hello all

    I have created a new link in my header to a gallery page I am trying to build. I have successfully created the link (Gallery) in my header but every time I click it it jumps to Page not Found. Can anyone help?

    website is: www.x-rayfog.com

    I am using the latest Zen Cart.

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

    Default Re: New link in Header not working

    The link points to /index.php?main_page=FILENAME_GALLERY, which indicates that FILENAME_GALLERY is not defined. Have you defined it? Where? Post the section of menu code you are working with, between [php] and [/php] tags.

  3. #3
    Join Date
    Apr 2011
    Posts
    4
    Plugin Contributions
    0

    Default Re: New link in Header not working

    Thanks for your quick response.
    I have defined the page in includes/extra_datafiles/gallery.php. I have followed a couple of different methods for creating this link (http://breathing-spring.com/creating...-for-zen-cart/) and none seem to work so I must be doing something wrong.

    If you look at www.xrayfog.com now, the extra_datafiles code appears above the header. I'm a little perplexed.

    As for the menu code, forgive my ignorance but do you mean the code for the header of the mainpage (includes/templates/template_default/common/tpl_header)? If so it is:

    <!--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 (DEFINE_GALLERY_STATUS <= 1) { ?>
    <li><?php echo '<a href="' . zen_href_link(FILENAME_GALLERY, '', 'SSL') . '">' . Gallery . '</a>'; ?></li>
    <?php } ?>
    <?php if (DEFINE_CONTACT_US_STATUS <= 1) { ?>
    <li><?php echo '<a href="' . zen_href_link(FILENAME_CONTACT_US, '', 'SSL') . '">' . BOX_INFORMATION_CONTACT . '</a>'; ?></li>
    <?php } ?>
    <?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-->

  4. #4
    Join Date
    Mar 2009
    Location
    Niagara Ontario
    Posts
    135
    Plugin Contributions
    0

    Default Re: New link in Header not working

    Did you get this sorted? the link worked for me other a line of code appearing http://www.x-rayfog.com/zencatalogue/
    Last edited by usr50; 14 Apr 2011 at 02:31 PM. Reason: updated

  5. #5
    Join Date
    Apr 2011
    Posts
    4
    Plugin Contributions
    0

    Default Re: New link in Header not working

    No, not sorted yet. I don't quite understand your message. Do you mean the link works for you?. Where does it take you?

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

    Default Re: New link in Header not working

    Your define code is being output as HTML content, not read as PHP.

    &lt;?php
    define(FILENAME_GALLERY, 'gallery');
    ?&gt;

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

  7. #7
    Join Date
    Apr 2011
    Posts
    4
    Plugin Contributions
    0

    Default Re: New link in Header not working

    Can you tell me how I would rectify this?

    Many thanks

    S

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

    Default Re: New link in Header not working

    What kind of file is the code in? How did you create the file (what editor did you use)? What is the complete content of that file as it exists on your server?

 

 

Similar Threads

  1. Nothing is working: trying to add external link to header menu
    By keyelement66 in forum Customization from the Admin
    Replies: 3
    Last Post: 2 Feb 2011, 03:28 PM
  2. New link in header.
    By bargincircus in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 18 Feb 2010, 12:14 AM
  3. Moving a working store to new domain name and not working
    By ksolito in forum General Questions
    Replies: 8
    Last Post: 19 Jun 2009, 07:44 PM
  4. Image link "open in new window" not working
    By kevinmc3 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 22 Mar 2008, 02:57 AM
  5. "larger image" link & thumbnail link not working
    By tracyselena in forum General Questions
    Replies: 1
    Last Post: 7 Nov 2007, 08:03 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR