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

Fix for search input field on search results page #521

Merged
merged 1 commit into from
Jun 24, 2015

Conversation

jeroenvermeulen
Copy link
Contributor

By default the the search input box is inside the header.
It needs to contain the current search string after searching, on the search results page.
Before this fix, the header ESI block was cached, so this did not work. The search string was wrong or not showing.

If the search input box is inside the header, it needs to contain the current search string after searching.
Before this fix, the header ESI block was cached, so this did not work. The search string was wrong or not showing.
@eth8505
Copy link
Contributor

eth8505 commented May 4, 2014

This will however slow down the search results page, which can be rather slow anyway. Especially if the default magento search is used.
What we have alternatively done, is implement a little javascript that auto-fills fields with some parameters. I could for example do the following:

<input type="text" data-autofill="p:q" />

which would inject the querystring parameter "q" into the input field with the header still cached.

@jeroenvermeulen
Copy link
Contributor Author

What you say is true, and for advanced users is a better solution.
However, when my fix is merged, the default install works better than before.
Adding such a javascript fix to Turpentine would complicate things too much.
Users can add it themselves, and remove the XML my fix adds.

If your search is slow, you may want to try my free Solr search extension. Also on GitHub.

@eth8505
Copy link
Contributor

eth8505 commented May 4, 2014

That is true @jeroenvermeulen :)
And about the search: It's not so much about my search being slow, but Magento search being rather slow in general, at least when using the default search. For most of our customers having problems with search performance, we have already implemented different solutions of course.

miguelbalparda added a commit that referenced this pull request Jun 24, 2015
Fix for search input field on search results page
@miguelbalparda miguelbalparda merged commit d4211ec into nexcess:devel Jun 24, 2015
@miguelbalparda miguelbalparda self-assigned this Jun 24, 2015
miguelbalparda added a commit that referenced this pull request Jun 24, 2015
miguelbalparda added a commit that referenced this pull request Jun 24, 2015
refs #521  	Fix for search input field on search results page and PHP 5.6.
@jeroenvermeulen jeroenvermeulen deleted the fix-search-box branch May 24, 2017 14:44
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

Successfully merging this pull request may close these issues.

3 participants