DevnagriAI / Auto-Search-List-Magento-1.9

0 stars 2 forks source link

Suggestion limit #2

Open mixpelinfo opened 3 years ago

mixpelinfo commented 3 years ago

How do I put a limit on suggestions in words?

When I type a word, it shows numerous suggestions.

suggestion_limit

LuizSantos1 commented 3 years ago

This is probally a missconfiguration on your Magento. Go to system/configuration/catalog/catalog/catalog search

If you want to disable Magento's default autocomplete, then you open Cpanel and go to: app/design/frontend/package/theme/template/catalogsearch/

Make a backup and edit this file: form.mini.phtml

Comment out this: <script type="text/javascript"> //<![CDATA[ var searchForm = new Varien.searchForm('search_mini_form', 'search', ''); searchForm.initAutocomplete('<?php echo $catalogSearchHelper->getSuggestUrl() ?>', 'search_autocomplete'); //]]> </script>

IMPORTANT NOTE If possible, do it on your theme and take notes of the modifications as it is not recommended modifying "base" theme. The correct way of doing this, is by going to the file on the theme and if it does not exist, copy it from the base theme to your custom theme.

ALTERNATIVELY you can use Bubble Autocomplete, but not the original version, the modified one by Winkelsdorf he has made some modifications to make it work properly. Also, go to the XML file extension to update the jQuery library as it uses and old jQuery version that can be exploited.

Change the line: /jquery-1.12.0.min.js</script></action> To: /jquery-1.12.1.min.js</script></action>

Please check if you have jquery-1.12.1.min.js on your theme as the extension will look for it.

MAKE BACKUP AND TEST IN A DEV STAGE B4 INSTALLING ON PRODUCTION