/// <summary> /// The index <see cref="ActionResult"/>. /// </summary> /// <param name="model"> /// The current render model. /// </param> /// <returns> /// The <see cref="ActionResult"/>. /// </returns> public override ActionResult Index(RenderModel model) { if (CurrentCustomer.IsAnonymous) { var error = new Exception("Current customer cannot be Anonymous"); LogHelper.Error <BazaarAccountController>("Anonymous customers should not be allowed to access the Account section.", error); return(this.RedirectToUmbracoPage(BazaarContentHelper.GetStoreRoot())); } var viewModel = ViewModelFactory.CreateAccount(model, AllCountries, AllowedShipCountries); return(this.View(viewModel.ThemeAccountPath("Account"), viewModel)); }
/// <summary> /// Initializes the model. /// </summary> private void Initialize() { _receiptPage = new Lazy <IPublishedContent>(() => BazaarContentHelper.GetStoreRoot().Descendant("BazaarReceipt")); }