I'm helping a fellow community member debug some code and we've come into an interesting situation. In the Nop.Web.Controllers.CatalogController we're debugging the Category(categoryId, command) method.
Line 851 we make a call to the ProductService.SearchProducts method.
var products = _productService.SearchProducts(category.Id, 0, false, minPriceConverted, maxPriceConverted,
0, string.Empty, false, _workContext.WorkingLanguage.Id, selectedSpecs,
(ProductSortingEnum)command.OrderBy, command.PageNumber - 1, command.PageSize);
model.Products = products.Select(x => PrepareProductOverviewModel(x)).ToList();
A part of this project the developer needs access to the collection properties on each product like ProductVariants and Manufacturers. When I install the sample data and debug I am able to see these properties being populated. During my testing I forced the ProductService to use the stored procedure once and to use the LINQ query once. Both times it worked correctly however the person I'm working with is not able to see these same results when working with his production data.
Is there any configuration (besides bad data) that would lead to these properties not having the appropriate lists of records after calling SearchProducts?
Thanks!