Results 1 to 8 of 8
  1. #1
    Join Date
    Jan 2010
    Posts
    130
    Plugin Contributions
    0

    Default Somewhere I am making Mistake

    I am trying to take Right Search Box at the centre of my own define page I got the search code also it is tpl_search.php file but when I insert search code in my define page code my page don't display anything, can any one help. Right now I removed the PHP code from my page

    Here is define page code
    HTML Code:
    <div id="cantaner">
    <div style="width: 315px; height: 600px; float: left;">
    <div id="box">
      <table width="100%" cellspacing="0" cellpadding="0" border="0">
        <tbody><tr>
          <td height="24" bgcolor="#8b0000" class="logintext"> ADD EXCESS INVENTORY </td>
            </tr>
              <tr>
                <td>
                  <ul id="myAccountGen" class="list">
                  <li><a href="index.php?main_page=myNewPage">New Excess Part List (Manually)</a></li>
                  <li><a href="excess_partlistupload.html">New Excess part List (Upload)</a></li>
                  <li><a href="excess_list_search.html">Excess Part Search/Edit/Delete</a> </li>
                  <li><a href="excess_partlist_bom_manager.html">Excess Part List/BOM Manager</a></li>
                  </ul>
                 </td>
                </tr>
       </tbody></table>
    </div>
    <div id="box1">
     <table width="100%" cellspacing="0" cellpadding="0" border="0">
      <tbody><tr>
       <td height="24" bgcolor="#8b0000"><strong class="logintext" style="color: rgb(255, 255, 255);">USER BILL OF MATERIAL</strong></td>
        </tr>
          <tr>
           <td>
            <ul id="myAccountGen" class="list">
             <li><a href="bom_create_maually.html">Create New BOM Part List (Manually)</a> </li>
             <li><a href="bom_partlistupload.html">Create New BOM part List (Upload) </a> </li>
             <li><a href="bom_list_search.html">BOM Part Search / Edit / Delete</a> </li>
             <li><a href="bom_partlist_bom_manager.html">BOM Part List  Manager</a> </li>
            </ul>
           </td>
          </tr>
         </tbody></table>
      </div>
    <div id="box1">
    <table width="100%" cellspacing="0" cellpadding="0" border="0">
     <tbody><tr>
     <td height="24" bgcolor="#8b0000"><strong class="logintext">REQUEST PART AVAILABILITY</strong> </td>
       </tr>
       <tr>
        <td>
          <ul id="myAccountGen" class="list">   
          <li><a href="excess_create_maually.html">Create Request Part List (Manually)</a></li>
          <li><a href="excess_partlistupload.html">Create Request Excess part List (Upload)</a></li>
          <li><a href="excess_list_search.html">Request Part List/Edit/Delete</a> </li>
          <li><a href="excess_partlist_bom_manager.html">Request Part List/BOM Manager</a> </li>
          </ul>
        </td>
      </tr>
    </tbody></table>
    </div>
    </div>
    
    <div class="normaltext" id="rightbox1"><strong>
      Check
      [PHP]
    <?php
    /**
     * Side Box Template
     *
     * @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_search.php 4142 2006-08-15 04:32:54Z drbyte $
     */
        $content = "";
      $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent centeredContent">';
      $content .= zen_draw_form('quick_find', zen_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get');
      $content .= zen_draw_hidden_field('main_page',FILENAME_ADVANCED_SEARCH_RESULT);
      $content .= zen_draw_hidden_field('search_in_description', '1') . zen_hide_session_id();
    
      if (strtolower(IMAGE_USE_CSS_BUTTONS) == 'yes') {
        $content .= zen_draw_input_field('keyword', '', 'size="18" maxlength="100" style="width: ' . ($column_width-30) . 'px"') . '<br />' . zen_image_submit (BUTTON_IMAGE_SEARCH,HEADER_SEARCH_BUTTON);
        $content .= '<br /><a href="' . zen_href_link(FILENAME_ADVANCED_SEARCH) . '">' . BOX_SEARCH_ADVANCED_SEARCH . '</a>';
      } else {
        $content .= zen_draw_input_field('keyword', '', 'size="18" maxlength="100" style="width: ' . ($column_width-30) . 'px" value="' . HEADER_SEARCH_DEFAULT_TEXT . '" onfocus="if (this.value == '' . HEADER_SEARCH_DEFAULT_TEXT . '') this.value = '';" onblur="if (this.value == '') this.value = '' . HEADER_SEARCH_DEFAULT_TEXT . '';"') . '<br />' .zen_image_submit(BUTTON_IMAGE_SEARCH,HEADER_SEARCH_BUTTON,'class="input" style="position:relative;left: 5px; bottom: 4px; top: 2px"');
        $content .= '<br />Or try  <a href="' . zen_href_link(FILENAME_ADVANCED_SEARCH) . '">' . BOX_SEARCH_ADVANCED_SEARCH . '</a>';}
    
      $content .= "</form>";
      $content .= '</div>';
    ?>
      [/PHP]
      </strong>
    </div>
      </div>
    You ca see it here

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

    Default Re: Some Where I am making Mistake

    By "my page don't display anything" do you mean the page is completely blank? That would mean a PHP error.
    If you mean that the form did not display, that is because you didn't tell it to. The sidebox code puts all of the HTML form code into $content, but until you send $content to the browser, it will not display. There are parts of the sidebox code that you don't want in your define page content.
    PHP Code:
    <?php
      $content 
    "";

      
    $content .= zen_draw_form('quick_find'zen_href_link(FILENAME_ADVANCED_SEARCH_RESULT'''NONSSL'false), 'get');
      
    $content .= zen_draw_hidden_field('main_page',FILENAME_ADVANCED_SEARCH_RESULT);
      
    $content .= zen_draw_hidden_field('search_in_description''1') . zen_hide_session_id();

      if (
    strtolower(IMAGE_USE_CSS_BUTTONS) == 'yes') {
        
    $content .= zen_draw_input_field('keyword''''size="18" maxlength="100" style="width: ' . ($column_width-30) . 'px"') . '<br />' zen_image_submit (BUTTON_IMAGE_SEARCH,HEADER_SEARCH_BUTTON);
        
    $content .= '<br /><a href="' zen_href_link(FILENAME_ADVANCED_SEARCH) . '">' BOX_SEARCH_ADVANCED_SEARCH '</a>';
      } else {
        
    $content .= zen_draw_input_field('keyword''''size="18" maxlength="100" style="width: ' . ($column_width-30) . 'px" value="' HEADER_SEARCH_DEFAULT_TEXT '" onfocus="if (this.value == '' . HEADER_SEARCH_DEFAULT_TEXT . '') this.value = '';" onblur="if (this.value == '') this.value = '' . HEADER_SEARCH_DEFAULT_TEXT . '';"') . '<br />' .zen_image_submit(BUTTON_IMAGE_SEARCH,HEADER_SEARCH_BUTTON,'class="input" style="position:relative;left: 5px; bottom: 4px; top: 2px"');
        
    $content .= '<br />Or try  <a href="' zen_href_link(FILENAME_ADVANCED_SEARCH) . '">' BOX_SEARCH_ADVANCED_SEARCH '</a>';}

      
    $content .= "</form>";
    ?>
    After this, tell it to display:
    PHP Code:
    <?php echo $content?>
    This is the only part of that file you want to put in your define page content, inside a div with a unique id.

    You have some bad HTML practice in your page code.
    An id should be unique (never more than once on a page), but you use

    <div id="box1">

    twice, and

    <ul id="myAccountGen" class="list">

    three times. Rename the ids so each one is different.

    You are using tables inside the divs to hold your other content, bit those tables are not doing anything necessary, and you can get the same output with only one div for each, holding the <h3> heading and the <ul> list.
    HTML Code:
    <div id="box1">
      <h3>ADD EXCESS INVENTORY</h3>
      <ul class="myAccountGen">
         <li><a href="index.php?main_page=myNewPage">New Excess Part List (Manually)</a></li>
         <li><a href="excess_partlistupload.html">New Excess part List (Upload)</a></li>
         <li><a href="excess_list_search.html">Excess Part Search/Edit/Delete</a> </li>
         <li><a href="excess_partlist_bom_manager.html">Excess Part List/BOM Manager</a></li>
      </ul>
    </div>
    
    <div id="box2">
    Then style
    #box1 {}
    #box2 {}
    #box1 h3 {}
    #box2 h3 {}
    #box1 ul {}
    #box2 ul {}
    etc. as you want.

  3. #3
    Join Date
    Jan 2010
    Posts
    130
    Plugin Contributions
    0

    Default Re: Some Where I am making Mistake

    Thank you Glenn

    I knew I will get answer from you only coz I asked 3-4 Zenner they don't have answer

    You are really Best in Zen Cart.

    You saw my code when I use that code it only display the header part nothing else.

    But now I will go with your instructions.

    Thank you

  4. #4
    Join Date
    Jan 2010
    Posts
    130
    Plugin Contributions
    0

    Default Re: Some Where I am making Mistake

    Hi Glenn

    I got the search box and button but Advance Search Link is not coming? Why So???

    http://www.oemxtrade.com/index.php?main_page=page_2

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

    Default Re: Some Where I am making Mistake

    What exactly does your define page code look like now? You appear to have cut more out of the search content than I recommended.
    And you still have the incorrect ids and unnecessary tables... they won't kill you, but it would be better work to use the right code for projects.

  6. #6
    Join Date
    Jan 2010
    Posts
    130
    Plugin Contributions
    0

    Default Re: Some Where I am making Mistake

    Dear Glenn

    Right now my exact code looks like this
    HTML Code:
    <div id="cantaner">
    <div style="width: 315px; height: 600px; float: left;">
    <div id="box">
      <table width="100%" cellspacing="0" cellpadding="0" border="0">
        <tbody><tr>
          <td height="24" bgcolor="#8b0000" class="logintext"> ADD EXCESS INVENTORY </td>
            </tr>
              <tr>
                <td>
                  <ul id="myAccountGen1" class="list">
                  <li><a href="index.php?main_page=myNewPage">New Excess Part List (Manually)</a></li>
                  <li><a href="excess_partlistupload.html">New Excess part List (Upload)</a></li>
                  <li><a href="excess_list_search.html">Excess Part Search/Edit/Delete</a> </li>
                  <li><a href="excess_partlist_bom_manager.html">Excess Part List/BOM Manager</a></li>
                  </ul>
                 </td>
                </tr>
       </tbody></table>
    </div>
    <div id="box1">
     <table width="100%" cellspacing="0" cellpadding="0" border="0">
      <tbody><tr>
       <td height="24" bgcolor="#8b0000"><strong class="logintext" style="color: rgb(255, 255, 255);">USER BILL OF MATERIAL</strong></td>
        </tr>
          <tr>
           <td>
            <ul id="myAccountGen2" class="list">
             <li><a href="bom_create_maually.html">Create New BOM Part List (Manually)</a> </li>
             <li><a href="bom_partlistupload.html">Create New BOM part List (Upload) </a> </li>
             <li><a href="bom_list_search.html">BOM Part Search / Edit / Delete</a> </li>
             <li><a href="bom_partlist_bom_manager.html">BOM Part List  Manager</a> </li>
            </ul>
           </td>
          </tr>
         </tbody></table>
      </div>
    <div id="box1">
    <table width="100%" cellspacing="0" cellpadding="0" border="0">
     <tbody><tr>
     <td height="24" bgcolor="#8b0000"><strong class="logintext">REQUEST PART AVAILABILITY</strong> </td>
       </tr>
       <tr>
        <td>
          <ul id="myAccountGen3" class="list">   
          <li><a href="excess_create_maually.html">Create Request Part List (Manually)</a></li>
          <li><a href="excess_partlistupload.html">Create Request Excess part List (Upload)</a></li>
          <li><a href="excess_list_search.html">Request Part List/Edit/Delete</a> </li>
          <li><a href="excess_partlist_bom_manager.html">Request Part List/BOM Manager</a> </li>
          </ul>
        </td>
      </tr>
    </tbody></table>
    </div>
    </div>
    
    <div class="normaltext" id="rightbox1"><strong>
    
    <?php echo $content; ?> 
      
      </strong>
    </div>
      </div>
    OK I changed ID of <ul id="myAccountGen" class="list"> to <ul id="myAccountGen1" class="list">, <ul id="myAccountGen2" class="list">, <ul id="myAccountGen3" class="list">
    Last edited by vishalon; 19 Feb 2010 at 08:05 AM.

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

    Default Re: Some Where I am making Mistake

    PHP Code:
    <div class="normaltext" id="rightbox1"><strong>

    <?php echo $content?> 
      
      </strong>
    </div>
    Where is all of the $content = code? You need that so there is something for echo $content; to output.

  8. #8
    Join Date
    Jan 2010
    Posts
    130
    Plugin Contributions
    0

    Default Re: Some Where I am making Mistake

    YES YES I GOT it Thank you Glenn

 

 

Similar Threads

  1. Design help! Made a mistake somewhere! Bluestripe Reloaded
    By geidorei in forum Addon Templates
    Replies: 1
    Last Post: 12 Jun 2011, 04:20 PM
  2. Template Monster - how big a mistake will I be making?
    By LankyLizards in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 23 Feb 2009, 02:59 PM
  3. Change html in 1 file somewhere?
    By kramer65 in forum Templates, Stylesheets, Page Layout
    Replies: 10
    Last Post: 5 Jul 2006, 06:52 AM

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