2014-12-24 4 views
1

작동하지 않습니다 나는 다음과 같은 일을 시도했다.젠토 검색 젠토 1.9

2) 색인화 데이터

3) 세척 젠토 캐시.

모두 사용하지 않았습니다.

catalogsearch.xml 내 코드는

<?xml version="1.0"?> 

<layout version="0.1.0"> 

<default> 
    <reference name="header"> 
     <block type="core/template" name="top.search" as="topSearch" template="catalogsearch/form.mini.phtml"/> 
    </reference> 
    <reference name="footer_links"> 
     <action method="addLink" translate="label title" module="catalogsearch" ifconfig="catalog/seo/search_terms"> 
      <label>Search Terms</label> 
      <url helper="catalogsearch/getSearchTermUrl" /> 
      <title>Search Terms</title> 
     </action> 
     <action method="addLink" translate="label title" module="catalogsearch"> 
      <label>Advanced Search</label> 
      <url helper="catalogsearch/getAdvancedSearchUrl" /> 
      <title>Advanced Search</title> 
     </action> 
    </reference> 
</default> 

<catalogsearch_result_index translate="label"> 
    <label>Quick Search Form</label> 
    <reference name="root"> 
     <action method="setTemplate"><template>page/3columns.phtml</template></action> 
    </reference> 
    <reference name="left_first"> 
    <!-- <block type="catalogsearch/layer" name="catalogsearch.leftnav" after="currency" template="catalog/layer/view.phtml"> 
      <block type="core/text_list" name="catalog.leftnav.state.renderers" as="state_renderers" /> 
     </block> --> 
    </reference> 
    <reference name="content"> 
     <block type="catalogsearch/result" name="search.result" template="catalogsearch/result.phtml"> 
      <block type="catalog/product_list" name="search_result_list" template="catalog/product/list.phtml"> 
       <block type="core/text_list" name="product_list.name.after" as="name.after" /> 
       <block type="core/text_list" name="product_list.after" as="after" /> 
       <block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml"> 
        <block type="page/html_pager" name="product_list_toolbar_pager"/> 
       </block> 
       <action method="addColumnCountLayoutDepend"><layout>empty</layout><count>6</count></action> 
       <action method="addColumnCountLayoutDepend"><layout>one_column</layout><count>5</count></action> 
       <action method="addColumnCountLayoutDepend"><layout>two_columns_left</layout><count>4</count></action> 
       <action method="addColumnCountLayoutDepend"><layout>two_columns_right</layout><count>4</count></action> 
       <action method="addColumnCountLayoutDepend"><layout>three_columns</layout><count>3</count></action> 
       <action method="setToolbarBlockName"><name>product_list_toolbar</name></action> 
      </block> 
      <action method="setListOrders"/> 
      <action method="setListModes"/> 
      <action method="setListCollection"/> 
     </block> 
    </reference> 
</catalogsearch_result_index> 

<catalogsearch_advanced_index translate="label"> 
    <label>Advanced Search Form</label> 
    <!-- Mage_Catalogsearch --> 
    <reference name="root"> 
     <action method="setTemplate"><template>page/2columns-right.phtml</template></action> 
    </reference> 
    <reference name="head"> 
     <action method="setTitle" translate="title" module="catalogsearch"><title>Advanced Search</title></action> 
     <action method="addItem"><type>js_css</type><name>calendar/calendar-win2k-1.css</name><params/><!--<if/><condition>can_load_calendar_js</condition>--></action> 
     <action method="addItem"><type>js</type><name>calendar/calendar.js</name><!--<params/><if/><condition>can_load_calendar_js</condition>--></action> 
     <action method="addItem"><type>js</type><name>calendar/calendar-setup.js</name><!--<params/><if/><condition>can_load_calendar_js</condition>--></action> 
    </reference> 
    <reference name="content"> 
     <block type="catalogsearch/advanced_form" name="catalogsearch_advanced_form" template="catalogsearch/advanced/form.phtml"/> 
     <block type="core/html_calendar" name="html_calendar" as="html_calendar" template="page/js/calendar.phtml"/> 
    </reference> 
</catalogsearch_advanced_index> 

<catalogsearch_advanced_result translate="label"> 
    <label>Advanced Search Result</label> 
    <update handle="page_two_columns_right" /> 
    <!-- Mage_Catalogsearch --> 
    <reference name="root"> 
     <action method="setTemplate"><template>page/2columns-right.phtml</template></action> 
    </reference> 
    <reference name="content"> 
     <block type="catalogsearch/advanced_result" name="catalogsearch_advanced_result" template="catalogsearch/advanced/result.phtml"> 
      <block type="catalog/product_list" name="search_result_list" template="catalog/product/list.phtml"> 
       <block type="core/text_list" name="product_list.name.after" as="name.after" /> 
       <block type="core/text_list" name="product_list.after" as="after" /> 
       <block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml"> 
        <block type="page/html_pager" name="product_list_toolbar_pager"/> 
       </block> 
       <action method="addColumnCountLayoutDepend"><layout>empty</layout><count>6</count></action> 
       <action method="addColumnCountLayoutDepend"><layout>one_column</layout><count>5</count></action> 
       <action method="addColumnCountLayoutDepend"><layout>two_columns_left</layout><count>4</count></action> 
       <action method="addColumnCountLayoutDepend"><layout>two_columns_right</layout><count>4</count></action> 
       <action method="addColumnCountLayoutDepend"><layout>three_columns</layout><count>3</count></action> 
       <action method="setToolbarBlockName"><name>product_list_toolbar</name></action> 
      </block> 
      <action method="setListOrders"/> 
      <action method="setListModes"/> 
      <action method="setListCollection"/> 
     </block> 
    </reference> 
</catalogsearch_advanced_result> 

<catalogsearch_term_popular translate="label"> 
    <label>Popular Search Terms</label> 
    <remove name="right"/> 
    <remove name="left"/> 

    <reference name="head"> 
     <action method="setTitle" translate="title" module="catalogsearch"><title>Search Terms</title></action> 
    </reference> 
    <reference name="root"> 
     <action method="setTemplate"><template>page/1column.phtml</template></action> 
    </reference> 
    <reference name="content"> 
     <block type="catalogsearch/term" name="seo.searchterm" template="catalogsearch/term.phtml"/> 
    </reference> 
</catalogsearch_term_popular> 

내가 검색을 데 header.phtml의 내 파일 내가 검색 문제가되지 해결 한

<?php 
/** 
* Magento 
* 
* NOTICE OF LICENSE 
* 
* This source file is subject to the Academic Free License (AFL 3.0) 
* that is bundled with this package in the file LICENSE_AFL.txt. 
* It is also available through the world-wide-web at this URL: 
* http://opensource.org/licenses/afl-3.0.php 
* If you did not receive a copy of the license and are unable to 
* obtain it through the world-wide-web, please send an email 
* to [email protected] so we can send you a copy immediately. 
* 
* DISCLAIMER 
* 
* Do not edit or add to this file if you wish to upgrade Magento to newer 
* versions in the future. If you wish to customize Magento for your 
* needs please refer to http://www.magentocommerce.com for more information. 
* 
* @category design 
* @package  rwd_default 
* @copyright Copyright (c) 2014 Magento Inc. (http://www.magentocommerce.com) 
* @license  http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) 
*/ 
/** 
* @var Mage_Page_Block_Html_Header $this 
*/ 
?> 


<!-- Header --> 
    <div class="header-section"> 
     <div class="header-panel"> 
     <div class="nav-btn"></div> 
      <div class="logo"> 
       <a href="<?php echo $this->getUrl('') ?>"><img src="<?php echo $this->getLogoSrc() ?>" alt=" $this->getLogoAlt()" /></a> 
      </div> 
      <div class="top-links"><a href="/ds4u/sales/guest/form/">ORDER TRACKING</a> 
       <?php $helper = Mage::helper('customer'); ?> 
       <?php if ($helper->isLoggedIn()) : ?> 
       <a href="<?php echo $helper->getLogoutUrl(); ?>"><?php echo $this->__('Logout');?></a> 
      <?php else :?> 
       <a href="<?php echo $helper->getLoginUrl(); ?>"><?php echo $this->__('Sign In');?></a> 
       <a href="<?php echo $helper->getRegisterUrl(); ?>"><?php echo $this->__('Register');?></a> 
      <?php endif; ?> 
      <?php echo $this->getAdditionalHtml(); ?></div> 
      <div class="box1"> 
       <div class="phone-no"> 
        <span class="icon"></span> 

       </div> 
       <?php echo $this->getChildHtml('topSearch') ?> 
      </div> 
      <div class="box2"> 
       <div class="links"> 
         <?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('header_content')->toHtml() ?> 
       </div> 
       <div class="checkout"> 
        <div class="amount">Basket <?php echo $this->helper('checkout')->formatPrice(Mage::getSingleton('checkout/cart')->getQuote()->getGrandTotal()); ?><span class="currency">£ $</span></div> 
        <button type="button" class="btn"><a href="<?php echo Mage::getUrl('checkout/cart'); ?>">CHECKOUT</a></button> 
       </div> 
      </div> 
      <div class="box3"> 
       <a href="#" class="phone"></a> 
       <a href="#" class="search"></a> 
       <a href="<?php echo Mage::getUrl('checkout/cart'); ?>" class="checkout"></a> 
       <a href="#" class="account"></a> 
      </div> 
     </div> 
    </div> 
    <!------------> 

    <!-- Dropdown --> 
    <div class="dropdown"> 
     <div class="search-box"> 
      <?php echo $this->getChildHtml('topSearch') ?> 
     </div> 
     <div class="account-box"> 
     <?php $helper = Mage::helper('customer'); ?> 
       <?php if ($helper->isLoggedIn()) : ?> 
       <a href="<?php echo $helper->getLogoutUrl(); ?>"><?php echo $this->__('Logout &gt;');?></a> 
      <?php else :?> 
       <a href="<?php echo $helper->getLoginUrl(); ?>"><?php echo $this->__('Sign In &gt;');?></a> 
       <a href="<?php echo $helper->getRegisterUrl(); ?>"><?php echo $this->__('Register &gt;');?></a> 
      <?php endif; ?> 
      <?php echo $this->getAdditionalHtml(); ?> 
      <a href="/ds4u/sales/guest/form/">ORDER TRACKING &gt;</a> 
     </div> 
    </div> 
    <!--End Header--> 
    <div class="skip-links"> 
      <a href="#header-nav" class="skip-link skip-nav"> 
       <span class="icon"></span> 
       <span class="label"><?php echo $this->__('Menu'); ?></span> 
      </a> 

      </div> 

     <!-- Navigation --> 

     <div id="header-nav" class="skip-content"> 
      <?php echo $this->getChildHtml('topMenu') ?> 
     </div> 

     <!-- Search --> 

     <!-- Cart --> 

     <!-- <div id="header-cart" class="skip-content"> 
      <div class="mini-cart"> 
       <div class="menu-wrapper"> 
        <div class="menu cart-menu"> 
         <div class="empty">Your cart is empty.</div> 
        </div> 
       </div> 
      </div> 
     </div> --> 
    </div> 
</header> 


<?php echo $this->getChildHtml('topContainer'); ?> 
+0

검색 결과에 빈 페이지가 표시됩니까? –

+0

아니요, 검색 창에 입력 한 이름을 표시하지만 결과가 없습니다. –

답변

1

입니다 일.

나는 위의 모든 것들을 질문 주석에 언급했지만 그 후에 catalogsearch.xml 파일을 내 문제를 해결 한 catalogsearch.xml 파일과 비교하는 솔루션을 생각해 냈습니다.

문제는 해당 파일에서 두 블록을 주석 처리했기 때문입니다.

자세한 내용은 스크린 샷이있는 블로그를 작성했습니다. Magento Search Not working