Пример #1
0
        public ActionResult ThankYou()
        {
            var model = new CartModel(_repository, CurrentLangId, null);
            try
            {
                var order = WebSession.Order;
                var amount = order.OrderItems.Sum(oi => oi.Quantity * oi.Price);
                var number = _repository.AddOrder(order);
                WebSession.OrderItems.Clear();
                model.OrderComplete = new OrderComplete
                {
                    Amount = amount,
                    Number = number.ToString(),
                    CustomerName = order.CustomerName
                };

                MailHelper.Notify(order, number);

                return View(model);
            }
            catch (Exception ex)
            {
                TempData["errorMessage"] = ex.Message;
                
            }
            return RedirectToAction("CheckOut");
        }
Пример #2
0
 public ActionResult CheckOutConfirm()
 {
     var model = new CartModel(_repository,CurrentLangId, null)
     {
         Order = WebSession.Order
     };
     this.SetSeoContent(model);
     return View(model);
 }