コード例 #1
0
        public ActionResult ProductTierPrices(int productId)
        {
            if (!_services.Permissions.Authorize(StandardPermissionProvider.DisplayPrices))
            {
                return(Content(""));
            }

            var product = _productService.GetProductById(productId);

            if (product == null)
            {
                throw new ArgumentException(T("Products.NotFound", productId));
            }


            if (!product.HasTierPrices)
            {
                // No tier prices
                return(Content(""));
            }

            var model = _helper.CreateTierPriceModel(product);

            return(PartialView("Product.TierPrices", model));
        }