/// <summary>
        /// Retrieve the final basket result
        /// Including all products with infos/ compared prices infos/ offers.discounts if available
        /// </summary>
        /// <param name="basket"></param>
        /// <returns></returns>
        public static BasketResult GetBasketResult(Basket basket)
        {
            var basketResult = new BasketResult();

            basket = ResetCurrentBasketFinalPrices(basket);

            basket.Products.ForEach(x => x.FinalPrice = 0.0);

            var products = basket.Products;

            var numberOfBreadsToCutPrice = 0;

            //Manage prices and offers on butter
            basketResult = ManageButter(products, basketResult, out numberOfBreadsToCutPrice);
            //Manage prices and offers on bread
            basketResult = ManageBread(products, basketResult, numberOfBreadsToCutPrice);
            //Manage prices and offers on milk
            basketResult = ManageMilk(products, basketResult);

            //Prices Result
            basketResult.FinalPrice = Math.Round(basketResult.Products.Sum(x => x.FinalPrice),2);
            basketResult.OriginalPrice = Math.Round(basketResult.Products.Sum(x => x.UnitPrice), 2);
            basketResult.SavedAmount = Math.Round((basketResult.OriginalPrice - basketResult.FinalPrice), 2);

            return basketResult;
        }
        public string AddButter(Butter butter)
        {
            try
            {
                Basket updatedBasket = null;
                _basketService.Add(butter, CurrentBasket, out updatedBasket);
                CurrentBasket = updatedBasket;
                return new JavaScriptSerializer().Serialize(CurrentBasket);
            }
            catch (Exception ex)
            {
                _logger.Handle(ex);
            }

            return "error";
        }
        public string AddMilk(Milk milk)
        {
            try
            {
                Basket updatedBasket = null;
                _basketService.Add(milk, CurrentBasket, out updatedBasket);
                CurrentBasket = updatedBasket;
                return new JavaScriptSerializer().Serialize(_basketService);
            }
            catch (Exception ex)
            {
                _logger.Handle(ex);
            }

            return "error";
        }
        public string RemoveBread(Bread bread)
        {
            try
            {
                Basket updatedBasket = null;
                _basketService.Remove(bread, CurrentBasket, out updatedBasket);
                CurrentBasket = updatedBasket;
                return new JavaScriptSerializer().Serialize(CurrentBasket);
            }
            catch (Exception ex)
            {
                _logger.Handle(ex);
            }

            return "error";
        }
        public string ClearOrder()
        {
            try
            {
                CurrentBasket = new Basket();
                return new JavaScriptSerializer().Serialize(CurrentBasket);
            }
            catch (Exception ex)
            {
                _logger.Handle(ex);
            }

            return string.Empty;
        }
 /// <summary>
 /// Reset the products final prices on every request
 /// </summary>
 /// <param name="basket">The current basket containing the customer order infos.</param>
 /// <returns></returns>
 private static Basket ResetCurrentBasketFinalPrices(Basket basket)
 {
     basket.Products.ForEach(x => x.FinalPrice = 0.0);
     return basket;
 }