Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Price is good, use it!
- OrdersManager manager = OrdersManager.GetManager();
- CatalogManager cmanager = CatalogManager.GetManager();
- if (CustomConfig.candleProductId == Guid.Empty) {
- ShowErrorMessage("A system error has occurred, please try again later.");
- return;
- }
- Product product = cmanager.GetProduct(CustomConfig.candleProductId);
- if (product == null) {
- ShowErrorMessage("A system error has occurred, please try again later.");
- return;
- }
- int quantity = 1;
- product.Price = amount;
- CartOrder order = DeleteCartForUser(manager);
- OptionsDetails optionsDetails = new OptionsDetails();
- //Add the Carols message
- product.Sku = txtMessage.Text;
- manager.AddToCart(order, product, optionsDetails, quantity);
- var checkoutPageUrl = SitefinityFunctions.GetPageUrl(WebsilkConfig.SitemapConfig.GetPageId("CheckoutPage"));
- HttpContext.Current.Response.Redirect(checkoutPageUrl);
Advertisement
Add Comment
Please, Sign In to add comment