Beispiel #1
0
        public virtual IActionResult ContactVendor(int vendorId)
        {
            if (!_vendorSettings.AllowCustomersToContactVendors)
            {
                return(RedirectToRoute("Homepage"));
            }

            var vendor = _vendorService.GetVendorById(vendorId);

            if (vendor == null || !vendor.Active || vendor.Deleted)
            {
                return(RedirectToRoute("Homepage"));
            }

            var model = new ContactVendorModel();

            model = _commonModelFactory.PrepareContactVendorModel(model, vendor, false);
            return(View(model));
        }