Skip to content
This repository has been archived by the owner on Mar 9, 2023. It is now read-only.

remove param "query" #165

Closed
wants to merge 1 commit into from
Closed

remove param "query" #165

wants to merge 1 commit into from

Conversation

mvenghaus
Copy link

On search results the "query" param exists in the base suggest url. If you change the search keyword the "query" param is in url and in options.

this.rq = new FactFinderAjax.Request(this.url, this.options);

And he doesn't use the new value from options.

@tuegeb
Copy link
Contributor

tuegeb commented Jul 13, 2016

Thanks for this pull request.

The issue cannot be reproduced. Please give us a step by step guide and more details about the shop environment (FACT-Finder version, Magento edition/version, etc.).

@mvenghaus
Copy link
Author

  • Magento 1.9.2.4
  • latest version of your module
  • chrome

Steps to reproduce:

  • search for keyword "shirt"
  • on the result page change the keyword to "shoe" in the form and wait for the suggestions
    -> suggestions are for "shirt" and not for "shoe" because "shirt" is query param in the url and "shoe" is query param in options

@tuegeb
Copy link
Contributor

tuegeb commented Jul 16, 2016

Thanks for the details.
Please consider also the port in the url, move the new code block to the affected block https://github.com/mvenghaus/Magento-FACTFinder/blob/3a006cc21fbdb6cd7f1ef656774dd5f205d6f4a7/src/app/code/community/FACTFinder/Suggest/Helper/Data.php#L47 and fix the formatting by replacing the tabs by four spaces.

@tuegeb
Copy link
Contributor

tuegeb commented Aug 30, 2016

@xpoback: Could you finalize this improvement, please?

@xpoback
Copy link
Contributor

xpoback commented Aug 31, 2016

@mvenghaus Thank you for your contribution.

@tuegeb I was able to reproduce the bug: suggest proxy should be deactivated in order to do that.

I'm not completely sure it the best way to handle URLs, but I would rather use a little preg_replace(), which works perfectly and solves the problem.

@xpoback xpoback closed this Aug 31, 2016
@tuegeb
Copy link
Contributor

tuegeb commented Aug 31, 2016

@xpoback: Filter, sorting and other FACT-Finder related parameters should be dropped, too. The channel should only be retained. These URL adjustments should only be made within the branch: https://github.com/Flagbit/Magento-FACTFinder/blob/23c4ea31f134f440fc638dfdc255ffd8eeecc700/src/app/code/community/FACTFinder/Suggest/Helper/Data.php#L46

@xpoback
Copy link
Contributor

xpoback commented Sep 1, 2016

@tuegeb Within which branch?

@xpoback xpoback reopened this Sep 1, 2016
@tuegeb
Copy link
Contributor

tuegeb commented Sep 1, 2016

The "else" branch which is related to the suggest requests which are not using the proxy.

xpoback added a commit that referenced this pull request Sep 1, 2016
Remove all params from suggest url except for "channel" to fix suggest on search page
@xpoback
Copy link
Contributor

xpoback commented Sep 1, 2016

@tuegeb
Should be fine now.

@xpoback xpoback closed this Sep 1, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants