Example #1
0
 private void LoadPreview()
 {
     Commerce.Content.CustomUrl c;
     c = HccApp.ContentServices.CustomUrls.Find(BvinField.Value);
     if (c != null)
     {
         if (c.Bvin != string.Empty)
         {
             var appUrl = HccApp.StoreUrl(false, false);
             litPreviewFrom.Text = appUrl + c.RequestedUrl.TrimStart('/');
             litPreviewTo.Text   = appUrl + c.RedirectToUrl.TrimStart('/');
         }
     }
 }
        protected override void OnActionExecuting(ActionExecutingContext filterContext)
        {
            base.OnActionExecuting(filterContext);

            SetSessionGuidCookies();

            ActionCultureSwitch = new CultureSwitch(HccApp.CurrentStore);

            InitializeLocalization();

            ViewBag.RootUrlSecure = HccApp.StoreUrl(true, false);
            ViewBag.RootUrl       = HccApp.StoreUrl(false, true);

            ViewBag.StoreClosed = HccApp.CurrentStore.Settings.StoreClosed;
            ViewBag.StoreName   = HccApp.CurrentStore.Settings.FriendlyName;

            // Save current URL for facebook like, etc.
            ViewBag.RawUrl     = Request.Url.ToString();
            ViewBag.CurrentUrl = GetOriginalUrl();
        }