public ActionResult Index(ShippingViewModel shipping) { TransactionLibrary.CreateShipment(shipping.SelectedShippingMethodId, overwriteExisting: true); TransactionLibrary.ExecuteBasketPipeline(); return(Redirect("/store/payment")); }
public ActionResult Index(ShippingViewModel shipping) { TransactionLibrary.CreateShipment(shipping.SelectedShippingMethodId, overwriteExisting: true); TransactionLibrary.ExecuteBasketPipeline(); var root = UmbracoContext.PublishedContentRequest.PublishedContent.AncestorsOrSelf("home").FirstOrDefault(); var payment = root.Descendants("payment").FirstOrDefault(); return(Redirect(payment.Url)); }
public ActionResult Index(ShippingViewModel shipping) { TransactionLibrary.CreateShipment(shipping.SelectedShippingMethodId, overwriteExisting: true); TransactionLibrary.ExecuteBasketPipeline(); var parent = PublishedRequest.PublishedContent.AncestorOrSelf("basket"); var payment = parent.Children(x => x.Name == "Payment").FirstOrDefault(); return(Redirect(payment.Url)); }
public void btnUpdateShipment_Click(object sender, EventArgs e) { var shipping = Page.FindWebPart <CMSWebParts_Ucommerce_Shipping>(); int shippingMethodId = 0; if (shipping == null) { return; } if (!Int32.TryParse(shipping.SelectedValue, out shippingMethodId)) { return; } TransactionLibrary.CreateShipment(shippingMethodId, Constants.DefaultShipmentAddressName, true); TransactionLibrary.ExecuteBasketPipeline(); HttpContext.Current.Response.Redirect("~/basket/payment"); }