Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2009
    Posts
    339
    Plugin Contributions
    0

    cart error Replacing Zen Cart banner with an HTML Header file?

    Should I use the overide system to allow me to do that.

    This is the code within my header2.html file

    "<div align="right">
    <table width="200" border="0" align="right" cellpadding="0" cellspacing="0" class="smallfont">
    <tr>
    <td class="smallpad" width="200" align="right" valign="middle">
    <a><div align="centre"><img src="http://www.newstore/cart.png">
    <a style="color: #FFFFFF;" href="cart.php">Shopping Cart</a>

    </td>
    </tr>
    <tr>
    <td width="200" height="2" align="right"><img src="images/headivider.gif" width="200" height="2"></td>
    </tr>
    <tr>

    <form name="form1" method="post" action="products.php?action=search">
    <td class="smallpad" width="200" align="right" valign="middle">
    <font color="#FFFFFF">Product Search:</font><br>

    <input name="search_data" type="text" class="header" size="16" maxlength="40">
    <input name="Submit" type="submit" class="go" value="Go!">"

    I've been attempting to work this for over a week now, I have everything else done but the header/banner

    Thanks in advance for your help.

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

    Default Re: Replacing Zen Cart banner with an HTML Header file

    If you want to use custom coding, you would use the override system. Copy /includes/templates/template_default/common/tpl_header.php to /includes/templates/your_template/common/tpl_header.php, and edit that one.

    Just curious, why do you want to write all-new code for search in header when there is an existing module for that? You could put your image in the header or logo, and move the search box where you want it, without changing the tested stock code.

  3. #3
    Join Date
    Nov 2009
    Posts
    339
    Plugin Contributions
    0

    Default Re: Replacing Zen Cart banner with an HTML Header file

    I am going to use the existing search. The code is from my existing working site. it comes with a search code but I will remove it.
    So based on what your saying is that all I have to do is change the code in the existing file. That's where my problem arises i'm not sure as to what files I have to change.
    Past experience has caused me a lot of problems with properly locating it on or i the Header/Banner,
    I'm trying to replace replace the powered by Zen cart logo and the
    Sales message goes here text with my logo an header file.
    See www.thetrailingedge.com thats the header I want to use.
    Thanks for your input, it is greatly appreciated

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

    Default Re: Replacing Zen Cart banner with an HTML Header file

    This tutorial describes how to change the logo: https://www.zen-cart.com/tutorials/i...hp?article=125

    Neither the cart nor search code will work in Zen Cart, as they refer to files from your old cart.

    You can copy the existing search box to a spot right after
    PHP Code:
    <!--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_IMAGEDIR_WS_TEMPLATE$current_page_base,'images'). '/' HEADER_LOGO_IMAGEHEADER_ALT_TEXT) . '</a>'?></div>
    PHP Code:
    <div id="navMainSearch"><?php require(DIR_WS_MODULES 'sideboxes/search_header.php'); ?></div>
    and put your own content around it.
    PHP Code:
    <div id="customSearchHeader">Product Search:
    <div id="navMainSearch"><?php require(DIR_WS_MODULES 'sideboxes/search_header.php'); ?></div>
    </div>
    The cart/header is available in Free Addons, and you can put the code for that just above the customSearchHeader div.

    Then you can style both of those in the stylesheet, with float: right; and some other properties as required (like headivider.gif as a background at the top of the search div). If you do the PHP code changes, I can advise on tweaking the styling.
    Last edited by gjh42; 11 Dec 2009 at 07:06 PM.

 

 

Similar Threads

  1. Zen Cart banner in header
    By dapottster in forum Basic Configuration
    Replies: 2
    Last Post: 1 Sep 2009, 04:19 AM
  2. problem replacing Zen Cart Logo with my own
    By kmickus in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 4 Mar 2007, 09:25 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