How do modify the full search function in nopCommerce
1.Go to the Nop.Web/Controllers/CatalogController. find the search action and set the searchinDescriptions to be true
IPagedList<Product> products = new PagedList<Product>(new List<Product>(), 0, 1);
// only search if query string search keyword is set (used to avoid searching or displaying search term min length error message on /search page load)
if (Request.Params["Q"] != null)
{
if (model.Q.Length < _catalogSettings.ProductSearchTermMinimumLength)
{
model.Warning = string.Format(_localizationService.GetResource("Search.SearchTermMinimumLengthIsNCharacters"), _catalogSettings.ProductSearchTermMinimumLength);
}
else
{
var categoryIds = new List<int>();
int manufacturerId = 0;
decimal? minPriceConverted = null;
decimal? maxPriceConverted = null;
bool searchInDescriptions = true;
if (model.As)
{
//advanced search
var categoryId = model.Cid;
if (categoryId > 0)
{
categoryIds.Add(categoryId);
if (model.Isc)
{
//include subcategories
categoryIds.AddRange(GetChildCategoryIds(categoryId));
}
}