[HttpPost] // POST: /checkout/applyshipping public ActionResult ApplyShipping() { ApplyShippingResponse result = new ApplyShippingResponse(); string rateKey = Request.Form["MethodId"]; string orderid = Request.Form["OrderId"]; if (rateKey == null) { rateKey = ""; } if (orderid == null) { orderid = ""; } Order o = MTApp.OrderServices.Orders.FindForCurrentStore(orderid); MTApp.OrderServices.OrdersRequestShippingMethodByUniqueKey(rateKey, o, MTApp.CurrentStore); MTApp.CalculateOrderAndSave(o); SessionManager.SaveOrderCookies(o, MTApp.CurrentStore); result.totalsastable = o.TotalsAsTable(); return(new PreJsonResult(MerchantTribe.Web.Json.ObjectToJson(result))); }
public ActionResult ApplyShipping() { ApplyShippingResponse result = new ApplyShippingResponse(); string rateKey = Request.Form["MethodId"]; string orderid = Request.Form["OrderId"]; if (rateKey == null) { rateKey = ""; } if (orderid == null) { orderid = ""; } Order o = MTApp.OrderServices.Orders.FindForCurrentStore(orderid); MTApp.OrderServices.OrdersRequestShippingMethodByUniqueKey(rateKey, o, MTApp.CurrentStore); MTApp.CalculateOrderAndSave(o); SessionManager.SaveOrderCookies(o, MTApp.CurrentStore); result.totalsastable = o.TotalsAsTable(); return new PreJsonResult(MerchantTribe.Web.Json.ObjectToJson(result)); }