2.10 Advanced Search - blank search term - no error, but does not search

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Il y a 12 ans
On SEARCH page.
If you don't enter any 'Search keyword' text, you don't get a warning.  But if you enter less than 3 you do.  It would be nice to have a warning for empty string too.

(just remove the outer:  if (!String.IsNullOrWhiteSpace


src\Presentation\Nop.Web\Controllers\CatalogController.cs
...
            if (!String.IsNullOrWhiteSpace(model.Q))
            {
                if (model.Q.Length < _catalogSettings.ProductSearchTermMinimumLength)
                {
                    model.Warning = string.Format(_localizationService.GetResource("Search.SearchTermMinimumLengthIsNCharacters"), _catalogSettings.ProductSearchTermMinimumLength);
                }


and additionally, if admin sets ProductSearchTermMinimumLength = 0, then one could search without keyword, yet use the other criteria (Category, Manufacturer, Price range).  Although I would probably want to have it check that at least one criteria was entered.


EDIT:
It would also be nice if the Warning message were in red :)
Il y a 12 ans
Thanks. I'll create a work item for this task
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.