Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for magento 1.9.0.1 ?? #5

Closed
planet001 opened this issue Jul 18, 2014 · 10 comments
Closed

Support for magento 1.9.0.1 ?? #5

planet001 opened this issue Jul 18, 2014 · 10 comments

Comments

@planet001
Copy link

I merge this into my project, something wrong happened when I search any product and can't change MySql fulltext's kind.

@ctasca
Copy link
Owner

ctasca commented Jul 18, 2014

Do you get any error or exception? Are you sure the module is installed?

@planet001
Copy link
Author

Yes, I follow your tutorials, and my front-end I have a error like this:
Fatal error: Call to a member function getSortedChildren() on a non-object in C:\xampp\htdocs\magentodemo\app\design\frontend\rwd\default\template\catalog\product\list.phtml on line 134
Can you give me some solutions? Thanks

@planet001
Copy link
Author

and somethings I search, it's show this error
Fatal error: Call to a member function getSortedChildren() on a non-object in C:\xampp\htdocs\magentodemo\app\design\frontend\rwd\default\template\catalog\product\list.phtml on line 180
:(

@ctasca
Copy link
Owner

ctasca commented Jul 21, 2014

I haven't tested the module on version 1.9.0.1 yet. Give me two days to set it up and reproduce the error.

@planet001
Copy link
Author

It's nice, thanks you for your help. I'm waiting your response, dear!

@planet001
Copy link
Author

hi ctasca,
These errors you can fix for version 1.9.0.1??

@ctasca
Copy link
Owner

ctasca commented Jul 29, 2014

Hi there,
I have set up version 1.9.0.1 with rwd design package.
I have fixed error by doing the following...

Copy app/design/frontend/base/default/layout/elasticsearch/layout.xml to app/design/frontend/rwd/default/layout/pocketphp

Copy app/design/frontend/base/default/template/elasticsearch to app/design/frontend/rwd/default/template/elasticsearch

Then replace layout.xml in rwd design package with the following:

<?xml version="1.0"?>

<layout version="0.1.0">
    <default>
        <reference name="head">
            <action method="addJs"><file>elasticsearch/elasticsearch.js</file></action>
        </reference>
        <reference name="header">
            <remove name="top.search"/>
            <block type="elasticsearch/search_form" name="top.elasticsearch" as="topSearch"
                   template="elasticsearch/form.mini.phtml"/>
        </reference>
        <reference name="footer_links">
            <action method="removeLinkByUrl">
                <url helper="catalogsearch/getAdvancedSearchUrl" />
            </action>
            <action method="addLink" translate="label title" module="elasticsearch">
                <label>Advanced Search</label>
                <url helper="elasticsearch/getAdvancedSearchUrl" />
                <title>Advanced Search</title>
            </action>
        </reference>
    </default>

    <elasticsearch_search_index>
        <label>Elasticsearch 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>
    </elasticsearch_search_index>

    <elasticsearch_advanced_index translate="label">
        <label>Elasticsearch 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>
    </elasticsearch_advanced_index>

    <elasticsearch_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>
    </elasticsearch_advanced_result>
</layout>

Let me know how it goes... Thanks.

@ctasca ctasca closed this as completed Jul 29, 2014
@planet001
Copy link
Author

It works well, many thanks ctasca, you are awesome 👍

@ctasca
Copy link
Owner

ctasca commented Jul 31, 2014

Great... Thanks for the feedback. I have also implemented popular search term in elasticsearch.
Just checkout the latest commits.

@planet001
Copy link
Author

I'll try it right now, thanks again 🐹

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants