public IActionResult Course(int id, string slug = null)
        {
            ViewData["ReturnUrl"] = GetRawTarget(Request);
            Course model = _repository.GetCourse(id);

            //replace the string for Bullets with proper Html


            return(View(model));
        }
Example #2
0
        public IActionResult AddToCart(int productId, string returnurl)
        {
            Course prod = _repository.GetCourse(productId);

            if (prod != null)
            {
                _cart.AddItem(prod, 1);
            }

            return(RedirectToLocal(returnurl));
        }
Example #3
0
        private string CreateThankyouMessage(UserCourse uc)
        {
            string courseName       = _repository.GetCourse(uc.CourseId).Name;
            string paymentreference = uc.StripePaymentId;

            string message = string.Format("<p>Thank you for your purchase of the course {0} from Amatis Training.</p>", courseName);

            message += string.Format("<p>Your payment reference is {0}</p>", paymentreference);
            message += "<p>If you have any questions or queries please do not hesitate to contact us.</p>";
            message += "<p><strong>Kind Regards</strong></p>";
            message += "<p><strong>Amatis Training</strong></p>";

            return(message);
        }