@@ -624,7 +624,7 @@ protected void ResolveCategoryProductsCount(TreeNode<CategoryNavigationModel.Cat
624624
625625 var ctx = new ProductSearchContext ( ) ;
626626 ctx . CategoryIds = categoryIds ;
627- ctx . CurrentStoreId = _workContext . CurrentStore . Id ;
627+ ctx . StoreId = _workContext . CurrentStore . Id ;
628628 node . Value . NumberOfProducts = _productService . CountProducts ( ctx ) ;
629629 }
630630 }
@@ -677,6 +677,7 @@ protected void ResolveCategoryProductsCount(TreeNode<CategoryNavigationModel.Cat
677677 // ctx.CategoryIds = categoryIds;
678678 // //ctx.OrderBy = ProductSortingEnum.Position;
679679 // //ctx.PageSize = 1;
680+ // ctx.StoreId = _workContext.CurrentStore.Id;
680681
681682 // //model.NumberOfProducts = _productService.SearchProducts(ctx).TotalCount;
682683 // model.NumberOfProducts = _productService.CountProducts(ctx);
@@ -1564,6 +1565,7 @@ public ActionResult Category(int categoryId, CatalogPagingFilteringModel command
15641565 ctx . LanguageId = _workContext . WorkingLanguage . Id ;
15651566 ctx . OrderBy = ProductSortingEnum . Position ;
15661567 ctx . PageSize = int . MaxValue ;
1568+ ctx . StoreId = _workContext . CurrentStore . Id ;
15671569
15681570 var featuredProducts = _productService . SearchProducts ( ctx ) ;
15691571
@@ -1608,6 +1610,7 @@ public ActionResult Category(int categoryId, CatalogPagingFilteringModel command
16081610 ctx2 . PageIndex = command . PageNumber - 1 ;
16091611 ctx2 . PageSize = command . PageSize ;
16101612 ctx2 . LoadFilterableSpecificationAttributeOptionIds = true ;
1613+ ctx2 . StoreId = _workContext . CurrentStore . Id ;
16111614
16121615 var products = _productService . SearchProducts ( ctx2 ) ;
16131616
@@ -1749,6 +1752,7 @@ public ActionResult Manufacturer(int manufacturerId, CatalogPagingFilteringModel
17491752 ctx . LanguageId = _workContext . WorkingLanguage . Id ;
17501753 ctx . OrderBy = ProductSortingEnum . Position ;
17511754 ctx . PageSize = int . MaxValue ;
1755+ ctx . StoreId = _workContext . CurrentStore . Id ;
17521756
17531757 var featuredProducts = _productService . SearchProducts ( ctx ) ;
17541758
@@ -1768,6 +1772,7 @@ public ActionResult Manufacturer(int manufacturerId, CatalogPagingFilteringModel
17681772 ctx2 . OrderBy = ( ProductSortingEnum ) command . OrderBy ;
17691773 ctx2 . PageIndex = command . PageNumber - 1 ;
17701774 ctx2 . PageSize = command . PageSize ;
1775+ ctx2 . StoreId = _workContext . CurrentStore . Id ;
17711776
17721777 var products = _productService . SearchProducts ( ctx2 ) ;
17731778
@@ -2633,6 +2638,7 @@ public ActionResult RecentlyAddedProducts(CatalogPagingFilteringModel command)
26332638 //ctx.PageIndex = command.PageNumber - 1;
26342639 //codehint: sm-edit end
26352640 ctx . FilterableSpecificationAttributeOptionIds = filterableSpecificationAttributeOptionIds ;
2641+ ctx . StoreId = _workContext . CurrentStore . Id ;
26362642
26372643 var products = _productService . SearchProducts ( ctx ) ;
26382644
@@ -2664,6 +2670,7 @@ public ActionResult RecentlyAddedProductsRss()
26642670 ctx . LanguageId = _workContext . WorkingLanguage . Id ;
26652671 ctx . OrderBy = ProductSortingEnum . CreatedOn ;
26662672 ctx . PageSize = _catalogSettings . RecentlyAddedProductsNumber ;
2673+ ctx . StoreId = _workContext . CurrentStore . Id ;
26672674
26682675 var products = _productService . SearchProducts ( ctx ) ;
26692676
@@ -2999,6 +3006,7 @@ public ActionResult ProductsByTag(int productTagId, CatalogPagingFilteringModel
29993006 ctx . OrderBy = ( ProductSortingEnum ) command . OrderBy ;
30003007 ctx . PageIndex = command . PageNumber - 1 ;
30013008 ctx . PageSize = command . PageSize ;
3009+ ctx . StoreId = _workContext . CurrentStore . Id ;
30023010
30033011 var products = _productService . SearchProducts ( ctx ) ;
30043012
@@ -3668,6 +3676,7 @@ public ActionResult Search(SearchModel model, SearchPagingFilteringModel command
36683676 ctx . OrderBy = ( ProductSortingEnum ) command . OrderBy ; // ProductSortingEnum.Position; // codehint: sm-edit
36693677 ctx . PageIndex = command . PageNumber - 1 ;
36703678 ctx . PageSize = command . PageSize ;
3679+ ctx . StoreId = _workContext . CurrentStore . Id ;
36713680
36723681 products = _productService . SearchProducts ( ctx ) ;
36733682
@@ -3707,6 +3716,7 @@ public ActionResult SearchTermAutoComplete(string term)
37073716 ctx . Keywords = term ;
37083717 ctx . OrderBy = ProductSortingEnum . Position ;
37093718 ctx . PageSize = productNumber ;
3719+ ctx . StoreId = _workContext . CurrentStore . Id ;
37103720
37113721 var products = _productService . SearchProducts ( ctx ) ;
37123722
0 commit comments