public virtual ActionResult CustomerProductReviews(int?page)
        {
            if (_workContext.CurrentCustomer.IsGuest())
            {
                return(new HttpUnauthorizedResult());
            }

            if (!_catalogSettings.ShowProductReviewsTabOnAccountPage)
            {
                return(RedirectToRoute("CustomerInfo"));
            }

            var model = _productModelFactory.PrepareCustomerProductReviewsModel(page);

            return(View(model));
        }
Exemple #2
0
        public virtual IActionResult CustomerProductReviews(int?pageNumber)
        {
            if (_customerService.IsGuest(_workContext.CurrentCustomer))
            {
                return(Challenge());
            }

            if (!_catalogSettings.ShowProductReviewsTabOnAccountPage)
            {
                return(RedirectToRoute("CustomerInfo"));
            }

            var model = _productModelFactory.PrepareCustomerProductReviewsModel(pageNumber);

            return(View(model));
        }