Beispiel #1
0
        private bool CheckIfConfiguredShowErrorIfNot()
        {
            Guid shoppingCartId = this.GetShoppingCartId();

            if (shoppingCartId == Guid.Empty)
            {
                return(ShowErrorMessageAndHidePanels("You cannot checkout without having anything in the cart"));
            }
            else if (CartHelper.GetCartOrder(this.OrdersManager, shoppingCartId).Details.Count == 0)
            {
                return(ShowErrorMessageAndHidePanels("You cannot checkout with no items in the cart"));
            }
            else if (UserProfileHelper.GetCurrentUserId() == Guid.Empty)
            {
                return(ShowErrorMessageAndHidePanels("You have to login to use checkout"));
            }
            return(true);
        }