Ejemplo n.º 1
0
        public virtual async Task <PromotionResult> EvaluatePromotionsAsync()
        {
            EnsureCartExists();

            var promotionResult = new PromotionResult();

            if (!LineItems.IsNullOrEmpty() && !LineItems.Any(i => i.IsReadOnly))
            {
                var evalContext = _mapper.Map <PromotionEvaluationContext>(this);
                promotionResult = await EvaluatePromotionsAsync(evalContext);
            }

            return(promotionResult);
        }