Magento 1.7高级搜索我们的订单?

时间:2013-08-08 09:24:39

标签: php magento-1.7 advanced-search

我有一个网站,我正在使用Magento 1.7.2购物车。我也在使用高级搜索。我的问题是当您在高级搜索(http://www.webstertoolbox.com/index.php/catalogsearch/advanced/)下从Power Watts中选择“全部”时,然后单击搜索产品显示页面显示所有搞砸了。

这是我的返回页面return.phtml代码:

?>
<div class="page-title">
    <h1><?php echo $this->__('Catalog Advanced Search') ?></h1>
</div>
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
<?php if($this->getResultCount()): ?>
    <p class="advanced-search-amount">
        <?php echo $this->helper('catalogsearch')->__('<strong>%d item(s)</strong> were     found using the following search criteria', $this->getResultCount()); ?>
    </p>
<?php else: ?>
    <p class="error-msg"><?php echo $this->helper('catalogsearch')->__('No items were     found using the following search criteria.');?> <a href="<?php echo $this->getFormUrl(); ?    >"><?php echo $this->helper('catalogsearch')->__('Modify your search'); ?></a></p>
<?php endif; ?>

<div class="advanced-search-summary">
    <?php $searchCriterias=$this->getSearchCriterias(); ?>
        <?php foreach (array('left', 'right') as $side): ?>
            <?php if(@$searchCriterias[$side]): ?>
                <ul>
                    <?php foreach($searchCriterias[$side] as $criteria): ?>
                        <li><strong><?php echo $this->htmlEscape($this->helper('catalog')->__($criteria['name'])); ?>:</strong> <?php echo $this->htmlEscape($criteria['value']); ?></li>
                    <?php endforeach; ?>
                </ul>
            <?php endif; ?>
        <?php endforeach; ?>
        <?php if($this->getResultCount()): ?>
        <p>
            <?php echo $this->helper('catalogsearch')->__("Don't see what you're lookingfor?"); ?>
        <a href="<?php echo $this->getFormUrl(); ?>"><?php echo $this->helper('catalogsearch')->__('Modify your search'); ?></a>
        </p>
    <?php endif; ?>
</div>
<?php if($this->getResultCount()): ?>
<?php echo $this->getProductListHtml() ?>
<?php endif; ?>
<?php $this->getSearchCriterias(); ?>

这是我的catalog.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">
            <block type="catalogsearch/layer" name="catalogsearch.leftnav" after="currency" template="catalog/layer/view.phtml"/>
        </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="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>

<!--
Advanced search results
-->

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

</layout>

为什么这样做以及如何将此页面恢复为默认值?由于某种原因,布局中断了,我需要像产品页面一样。

以下是产品页面的链接,了解详情如何:http://www.webstertoolbox.com/index.php/products/genlume-collection.html

您可以在此处找到该网站:http://www.webstertoolbox.com/index.php/catalogsearch/advanced/result/?name=&sku=&power_wattage%5B%5D=57

如果您还需要其他信息,请告诉我?

以下是以红色突出显示的产品照片:http://webstertoolbox.com/magento.jpg

0 个答案:

没有答案