aimeosInputComplete.autocomplete returns always all products

Questions around the TYPO3 integration and plugins
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
mainfactory
Posts: 6
Joined: 06 Dec 2018, 12:33

aimeosInputComplete.autocomplete returns always all products

Post by mainfactory » 06 Dec 2018, 13:04

Dear aimeos Team

First of all: Thank you very much for your work and the great Typo3 Extension!
I'm working with Typo3 8.7.20 and aimeos Typo3 Extension 18.10.2. I followed you online installation guide and did setup the store basic with your .t3d file (Aimeos-pages_two-columns_18.1.t3d).
I' using PHP 7.2.1 / And Apache Webserver / Develop local with MAMP on Mac OS

I rearrange the tree at the backend a bit. I installed a own extension to change the templates generated with your online service. First I had some trouble because I m using a HTML Template which needs jQuery be included at the top of the page (Head) and aimeos does this at the end (before closing body tag). When I removed the aimeos jQuery and only had my own one at the top, aimeos stopped working correctly. There were errors at the console. One was aimeosInputComplete.autocomplete is not a function... Then I changed back and I m using two jQuery Libraries now and working with noConflict(); This all just for information how my setup does look like...

No everything looks very good. There is no error message at the console. When I type a search string I can see that the JSON is getting fired and the search string is being passed to the aimeosInputComplete function. JSON returns my products as a search result.

So far so good… but now I have the problem that JSON always return all products in my database.
The search term is being ignored completely.

Beside this I have the problem, that when I'm searching (by press Search button) I only get a search result when I search for products without special german characters like ä,ö,ü inside the product name. (Maybe this problem has the same origin?).

Thanks for your help.
Attachments
aimeos-typo3-search-autocomplete-b.jpg
aimeos-typo3-search-autocomplete-b.jpg (72.12 KiB) Viewed 903 times

User avatar
aimeos
Administrator
Posts: 7866
Joined: 01 Jan 1970, 00:00

Re: aimeosInputComplete.autocomplete returns always all prod

Post by aimeos » 07 Dec 2018, 13:08

If you love Aimeos, like it on GitHub and spread the word :-)

First, you shouldn't add two jQuery files as it is usually no problem to move the Aimeos jQuery script tag to the top using:

Code: Select all

page.includeJSFooterlibs.jquery >
page.includeJSLibs.jquery = https://code.jquery.com/jquery-2.2.4.min.js
page.includeJSLibs.jquery.external = 1
Then, keep in mind Aimeos doesn't search for product names in the suggestion list only but also in all texts that are associated to the products and all bundled and variant products as well.

Regarding the special character problem, please check if your database tables use "utf8_general_ci", "utf8mb4_general_ci", "utf8_unicode_ci" or "utf8mb4_unicode_ci" (the last two are the best options). This is especially important for the mshop_index_text table so MySQL knows how to cope with these characters.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply