public async Task <ActionResult> ContactForm([FromForm] ContactForm model, string viewName = "page.contact") { //TODO: Test with exist contact us form await _storeApi.SendDynamicNotificationAnStoreEmailAsync(model.ToServiceModel(WorkContext)); if (model.Contact.ContainsKey("RedirectUrl") && model.Contact["RedirectUrl"].Any()) { return(StoreFrontRedirect(model.Contact["RedirectUrl"].First())); } return(View(viewName, WorkContext)); }
public async Task <ActionResult> Feedback([FromBody] ContactForm model) { await _storeApi.SendDynamicNotificationAnStoreEmailAsync(model.ToServiceModel(WorkContext)); return(Ok()); }
public async Task <ActionResult> Feedback(ContactForm model) { await _storeApi.StoreModule.SendDynamicNotificationAnStoreEmailAsync(model.ToServiceModel(WorkContext)); return(new HttpStatusCodeResult(HttpStatusCode.OK)); }
public async Task<ActionResult> СontactForm(ContactForm model, string viewName = "page.contact") { await _storeModuleApi.StoreModule.SendDynamicNotificationAnStoreEmailAsync(model.ToServiceModel(WorkContext)); WorkContext.ContactUsForm = model; if (model.Contact.ContainsKey("RedirectUrl") && model.Contact["RedirectUrl"].Any()) { return StoreFrontRedirect(model.Contact["RedirectUrl"].First()); } return View(viewName, WorkContext); }