protected override void OnPreInit(EventArgs e) { base.OnPreInit(e); // We don't care about culuture of store at this time. // We simply need some non-localizable store settings to initialize thread culture. var currentStore = HccRequestContext.Current.CurrentStore; if (ForceWizardRedirect && currentStore == null && CurrentTab != AdminTabType.SetupWizard) { Response.Redirect(WizardPagePath); } HccRequestContextUtils.UpdateAdminContentCulture(HccRequestContext.Current); // Redirect to HTTPS if ssl required if (currentStore != null) { if (currentStore.Settings.ForceAdminSSL && !Request.IsSecureConnection) { SSL.SSLRedirect(SSL.SSLRedirectTo.SSL); } CultureSwitch.SetCulture(currentStore); } ValidateBasicAccess(); Localization = Factory.Instance.CreateLocalizationHelper(LocalResourceFile); }
protected override void OnPreInit(EventArgs e) { base.OnPreInit(e); HccRequestContextUtils.UpdateAdminContentCulture(HccRequestContext.Current); CultureSwitch.SetCulture(HccRequestContext.Current.CurrentStore); ValidatBasicAccess(); }
public void ProcessRequest(HttpContext context) { Localization = Factory.Instance.CreateLocalizationHelper(LocalResourceFile); HccRequestContextUtils.UpdateAdminContentCulture(HccRequestContext.Current); CultureSwitch.SetCulture(HccRequestContext.Current.CurrentStore); var res = HandleAction(context, HotcakesApplication.Current); context.Response.ContentType = "application/json"; context.Response.Write(res.ObjectToJson()); }