private void ShowOver13()
 {
     ShippingAddressStaticView.Enable();
     ShipMethodView.Enable();
     PanelCheckboxOver13.Enabled = true;
     ActivatePanelClass(PanelCheckboxOver13, ACTIVE_PANEL_CSSCLASS);
 }
        private void InitializePageState()
        {
            this.LoginView.Show();
            this.LoginView.BindView();
            this.LoginView.Disable();

            if (this.ShoppingCartModel.ShippingRequired)
            {
                this.PanelShippingMethod.Visible      = true;
                this.PanelShippingAddressWrap.Visible = true;

                this.ShipMethodView.Show();
                this.ShipMethodView.BindView();
                this.ShipMethodView.Disable();
            }
            else
            {
                this.PanelShippingMethod.Visible      = false;
                this.PanelShippingAddressWrap.Visible = false;

                this.ShipMethodView.Hide();
            }

            this.PaymentView.Show();
            this.PaymentView.BindView();
            this.PaymentView.Disable();

            this.ShippingAddressStaticView.Hide();
            this.ShippingAddressEditView.Hide();
            this.ShippingAddressEditUKView.Hide();
            this.ShippingAddressNoZipEditView.Hide();

            PanelTerms.Visible = ConfigurationProvider.DefaultProvider.RequireTermsAndConditions;
            PanelTerms.Enabled = false;

            PanelCheckboxOver13.Enabled = false;

            if (this.AccountModel.IsRegistered)
            {
                this.CreateAccountView.Hide();
                this.PanelCreateAccount.Visible = false;
                this.PanelEmailOptIn.Visible    = false;

                if (this.ShoppingCartModel.ShippingRequired)
                {
                    this.AddressBookView.Show();
                    this.AddressBookView.BindView();
                    this.AddressBookView.Disable();

                    this.HyperLinkShippingAddressBook.Enabled = true;
                    this.HyperLinkShippingAddressBook.Visible = true;

                    this.ShippingAddressStaticView.Show();
                    this.ShippingAddressStaticView.BindView();
                    this.ShippingAddressStaticView.Disable();
                }
            }
            else
            {
                this.EmailOptInYes.Enabled = this.AccountModel.AllowEmailSelected;

                litEmailPrefYes.Text = this.StringResourceProvider.GetString("smartcheckout.aspx.4");
                litEmailPrefNo.Text  = this.StringResourceProvider.GetString("smartcheckout.aspx.5");

                this.EmailOptInNo.Enabled    = this.AccountModel.AllowEmailSelected;
                this.PanelEmailOptIn.Visible = ConfigurationProvider.DefaultProvider.ShowEmailPreferencesOnCheckout;

                if (this.ShoppingCartModel.ShippingRequired)
                {
                    if (string.IsNullOrEmpty(this.AccountModel.ShippingAddress.Country))
                    {
                        if (ConfigurationProvider.DefaultProvider.AddressLocale.Equals("UK"))
                        {
                            this.ShippingAddressEditUKView.Initialize();
                            this.ShippingAddressEditUKView.Show();
                            this.ShippingAddressEditUKView.BindView();
                            this.ShippingAddressEditUKView.Disable();
                        }
                        else
                        {
                            if (ConfigurationProvider.DefaultProvider.UseZipcodeService)
                            {
                                this.ShippingAddressEditView.Initialize();
                                this.ShippingAddressEditView.Show();
                                this.ShippingAddressEditView.BindView();
                                this.ShippingAddressEditView.Disable();
                            }
                            else
                            {
                                this.ShippingAddressNoZipEditView.Initialize();
                                this.ShippingAddressNoZipEditView.Show();
                                this.ShippingAddressNoZipEditView.BindView();
                                this.ShippingAddressNoZipEditView.Disable();
                            }
                        }
                    }
                    else
                    {
                        this.ShippingAddressStaticView.Show();
                        this.ShippingAddressStaticView.BindView();
                        this.ShippingAddressStaticView.Disable();
                    }
                }

                if (!ConfigurationProvider.DefaultProvider.ShowCreateAccount &&
                    ConfigurationProvider.DefaultProvider.PasswordIsOptionalDuringCheckout)
                {
                    this.CreateAccountView.Hide();
                    this.PanelCreateAccount.Visible = false;
                }
                else
                {
                    this.CreateAccountView.Show();
                    this.CreateAccountView.BindView();
                    this.CreateAccountView.Disable();
                    this.PanelCreateAccount.Visible = true;
                }

                this.HyperLinkShippingAddressBook.Enabled = false;
                this.HyperLinkShippingAddressBook.Visible = false;

                this.AddressBookView.Hide();

                PanelCheckboxOver13.Visible = ConfigurationProvider.DefaultProvider.RequireOver13Checked;
            }

            // Show / Hide payment screen if zero dollar order
            PanelPaymentAndBilling.Visible = this.ShoppingCartModel.Total > 0;

            this.MiniCartCartSummary.BindView();

            // if amazon payments, show widgets, and disable shipping address editor
            GatewayCheckoutByAmazon.CheckoutByAmazon checkoutByAmazon = new GatewayCheckoutByAmazon.CheckoutByAmazon();

            var amazonPaymentModel = this.PaymentModel.PaymentMethods.FirstOrDefault(pm => pm.Key == PaymentType.CheckoutByAmazon).Value;

            if (amazonPaymentModel != null)
            {
                var paymentMethod = (CheckOutByAmazonPaymentModel)amazonPaymentModel;
                LitCheckOutByAmazoneShipping.Text = paymentMethod.RenderAddressWidget(new Guid(AspDotNetStorefrontCore.Customer.Current.CustomerGUID));
                LitAmazonPaymentWidget.Text       = paymentMethod.RenderWalletWidget();
            }

            if (IsCheckOutByAmazon())
            {
                PanelCheckOutByAmazonShipping.Visible = true;
                PanelShippingAddressWrap.Visible      = false;
                ShippingAddressEditView.Hide();
                ShippingAddressEditUKView.Hide();
                ShippingAddressStaticView.Hide();
                this.ShippingAddressEditView.Visible = false;

                if (checkoutByAmazon.GetDefaultShippingAddress() == null)
                {
                    SubmitOrder.OnClientClick = "alert('" + this.StringResourceProvider.GetString("gw.checkoutbyamazon.display.3") + "'); return false;";
                }
            }

            this.SubmitOrder.Visible = false;
            this.SubmitOrder.Enabled = false;
        }