Beispiel #1
0
        //My account / Reward points
        public virtual async Task <IActionResult> CustomerRewardPoints([FromServices] RewardPointsSettings rewardPointsSettings)
        {
            if (!_workContext.CurrentCustomer.IsRegistered())
            {
                return(Challenge());
            }

            if (!rewardPointsSettings.Enabled)
            {
                return(RedirectToRoute("CustomerInfo"));
            }

            var customer = _workContext.CurrentCustomer;
            var model    = await _orderViewModelService.PrepareCustomerRewardPoints(customer);

            return(View(model));
        }
        //My account / Reward points
        public virtual IActionResult CustomerRewardPoints()
        {
            if (!_workContext.CurrentCustomer.IsRegistered())
            {
                return(Challenge());
            }

            var rewardPointsSettings = EngineContext.Current.Resolve <RewardPointsSettings>();

            if (!rewardPointsSettings.Enabled)
            {
                return(RedirectToRoute("CustomerInfo"));
            }

            var customer = _workContext.CurrentCustomer;
            var model    = _orderViewModelService.PrepareCustomerRewardPoints(customer);

            return(View(model));
        }