public ActionResult RemovePromo(string code) { if (!string.IsNullOrEmpty(code)) { var customer = HttpContext.GetCustomer(); PromotionManager.ClearPromotionUsages(customerId: customer.CustomerID, promotionCode: code, removeAutoAssigned: true); } return(RedirectToAction(ActionNames.Index, ControllerNames.Checkout)); }
protected void repeatPromotions_ItemCommand(Object sender, RepeaterCommandEventArgs e) { if (e.Item.ItemType != ListItemType.Item && e.Item.ItemType != ListItemType.AlternatingItem) { return; } PromotionManager.ClearPromotionUsages(ThisCustomer.CustomerID, e.CommandArgument.ToString(), true); UpdateCart(); BindPromotions(); }