/// <summary> /// Called when [active step changed]. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param> protected void OnActiveStepChanged(object sender, EventArgs e) { if (CheckoutWizard.ActiveStepIndex == CheckoutWizard.WizardSteps.IndexOf(this.ShippingOptionsStep)) { CheckoutWizard.StepNextButtonText = RM.GetString("CHECKOUT_SHIPPINGOPTIONS_NEXT"); } else if (CheckoutWizard.ActiveStepIndex == CheckoutWizard.WizardSteps.IndexOf(this.PaymentStep)) { CheckoutWizard.StepNextButtonText = RM.GetString("CHECKOUT_PAYMENT_PLACE_ORDER"); } else if (CheckoutWizard.ActiveStepIndex == CheckoutWizard.WizardSteps.IndexOf(this.FinalStep)) { CheckoutWizard.StepNextButtonText = RM.GetString("CHECKOUT_ORDER_CONFIRMATION_BUTTON"); } // Set default button if (CheckoutWizard.ActiveStepIndex == CheckoutWizard.WizardSteps.IndexOf(this.FinalStep)) { Page.Form.DefaultButton = CheckoutWizard.FindControl("FinishNavigationTemplateContainerID$FinishButton").UniqueID; } else { Page.Form.DefaultButton = CheckoutWizard.FindControl("StepNavigationTemplateContainerID$StepNextButton").UniqueID; } CheckWizardState(); }
/// <summary> /// Handles the Load event of the Page control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param> protected void Page_Load(object sender, System.EventArgs e) { if (CartHelper.IsEmpty) { Response.Redirect(NavigationManager.GetUrl("ShoppingCart")); } if (Session[MarketingContext.ContextConstants.Coupons] != null) { SetCouponCode(Session[MarketingContext.ContextConstants.Coupons].ToString()); } if (!this.IsPostBack) { InitializeData(); DataBind(); } // Set default button if (CheckoutWizard.ActiveStepIndex == 0) { Page.Form.DefaultButton = CheckoutWizard.FindControl("StartNavigationTemplateContainerID$StartNextButton").UniqueID; } }