Beispiel #1
0
        protected override IView CreateView(ControllerContext controllerContext, string viewPath, string masterPath)
        {
            var skinId   = (int)controllerContext.RouteData.Values["SkinId"];
            var skinName = SkinProvider.GetSkinNameById(skinId);

            return(base.CreateView(controllerContext, viewPath.Replace("(!SkinName!)", skinName), masterPath.Replace("(!SkinName!)", skinName)));
        }
Beispiel #2
0
        public string RenderToken(TokenHandlerContext context)
        {
            if (!Tokens.Contains(context.Token, StringComparer.OrdinalIgnoreCase))
            {
                return(null);
            }

            return(SkinProvider.GetSkinNameById(context.Customer.SkinID));
        }
Beispiel #3
0
        public string RenderToken(TokenHandlerContext context)
        {
            if (!Tokens.Contains(context.Token, StringComparer.OrdinalIgnoreCase))
            {
                return(null);
            }

            var virtualSkinPath = string.Format("~/skins/{0}", SkinProvider.GetSkinNameById(context.Customer.SkinID));

            return(VirtualPathUtility
                   .ToAbsolute(virtualSkinPath)
                   .ToLower());
        }
        public ActionResult SelectWallet()
        {
            var customer        = HttpContext.GetCustomer();
            var paymentProfiles = WalletProvider.GetPaymentProfiles(customer);

            return(PartialView(new WalletSelectViewModel(
                                   walletPaymentTypes: paymentProfiles
                                   .Select(profile => new WalletPaymentType
            {
                PaymentProfileId = profile.PaymentProfileId,
                CardType = profile.CardType,
                CardNumber = profile.CreditCardNumberMasked,
                ExpirationMonth = profile.ExpirationMonth,
                ExpirationYear = profile.ExpirationYear,
                CardImage = Url.Content(string.Format("~/skins/{0}/Images/{1}",
                                                      SkinProvider.GetSkinNameById(customer.SkinID),
                                                      DisplayTools.GetCardImage(string.Empty, profile.CardType)))
            }))));
        }