Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #354 - Reverting Redirect changes #355

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ private RedirectResult HandleActionParams()
{
var redirect = bool.Parse(RedirectToCheckout);
if (redirect)
Redirect(Url.RouteHccUrl(HccRoute.Checkout));
Response.Redirect(Url.RouteHccUrl(HccRoute.Checkout));
}
return Redirect(Url.RouteHccUrl(HccRoute.Cart));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ private CategoryPageViewModel LoadCategoryModel(string slug, string preContentCo
{
var redirectUrl = HccUrlBuilder.RouteHccUrl(HccRoute.Category, new {slug = customUrl.RedirectToUrl});
if (customUrl.IsPermanentRedirect)
RedirectPermanent(redirectUrl);
Response.RedirectPermanent(redirectUrl);
else
Redirect(redirectUrl);
Response.Redirect(redirectUrl);
}
if (cat == null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ public ActionResult ApplyEUVatRules()
private CheckoutViewModel LoadCheckoutModel()
{
if (CurrentCart == null || CurrentCart.Items == null || CurrentCart.Items.Count == 0)
Redirect(Url.RouteHccUrl(HccRoute.Cart));
Response.Redirect(Url.RouteHccUrl(HccRoute.Cart));

var model = new CheckoutViewModel { CurrentOrder = CurrentCart };

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ private void ProcessOrder(CheckoutViewModel model)
var tempOrder = HccApp.OrderServices.Orders.FindForCurrentStore(model.CurrentOrder.bvin);
HccApp.CurrentRequestContext.IntegrationEvents.OrderReceived(tempOrder, HccApp);
SessionManager.AnalyticsOrderId = model.CurrentOrder.bvin;
Redirect(Url.RouteHccUrl(HccRoute.Checkout,
Response.Redirect(Url.RouteHccUrl(HccRoute.Checkout,
new {action = "receipt", id = model.CurrentOrder.bvin}));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ private void ProcessOrder(CheckoutViewModel model)
var tempOrder = HccApp.OrderServices.Orders.FindForCurrentStore(model.CurrentOrder.bvin);
HccApp.CurrentRequestContext.IntegrationEvents.OrderReceived(tempOrder, HccApp);
SessionManager.AnalyticsOrderId = model.CurrentOrder.bvin;
Redirect(Url.RouteHccUrl(HccRoute.Checkout,
Response.Redirect(Url.RouteHccUrl(HccRoute.Checkout,
new {action = "receipt", id = model.CurrentOrder.bvin}));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ private void DisplayPaypalExpressMode(CheckoutViewModel model)
model.PayPalPayerId = Request.QueryString["payerId"] ?? string.Empty;

if (string.IsNullOrEmpty(model.PayPalToken))
Redirect(Url.RouteHccUrl(HccRoute.Cart));
Response.Redirect(Url.RouteHccUrl(HccRoute.Cart));


var ppAPI = PaypalExpressUtilities.GetPaypalAPI(HccApp.CurrentStore);
Expand Down Expand Up @@ -280,7 +280,7 @@ private void ProcessOrder(CheckoutViewModel model)
var tempOrder = HccApp.OrderServices.Orders.FindForCurrentStore(model.CurrentOrder.bvin);
HccApp.CurrentRequestContext.IntegrationEvents.OrderReceived(tempOrder, HccApp);
SessionManager.AnalyticsOrderId = model.CurrentOrder.bvin;
Redirect(Url.RouteHccUrl(HccRoute.Checkout,
Response.Redirect(Url.RouteHccUrl(HccRoute.Checkout,
new {action = "receipt", id = model.CurrentOrder.bvin}));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ private Product ParseProductFromSlug(string slug)
var redirectUrl = HccUrlBuilder.RouteHccUrl(HccRoute.ProductReview,
new {slug = url.RedirectToUrl});
if (url.IsPermanentRedirect)
RedirectPermanent(redirectUrl);
Response.RedirectPermanent(redirectUrl);
else
Redirect(redirectUrl);
Response.Redirect(redirectUrl);
}
StoreExceptionHelper.ShowInfo(Localization.GetString("ProductNotFound"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,9 @@ private ProductPageViewModel LoadProductModel(string slug)
{
var redirectUrl = HccUrlBuilder.RouteHccUrl(HccRoute.Product, new {slug = customUrl.RedirectToUrl});
if (customUrl.IsPermanentRedirect)
RedirectPermanent(redirectUrl);
Response.RedirectPermanent(redirectUrl);
else
Redirect(redirectUrl);
Response.Redirect(redirectUrl);
}
if (product == null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public void ValidatAccess()
{
if (!HccApp.MembershipServices.IsUserLoggedIn())
{
Redirect(HccApp.MembershipServices.GetLoginPagePath());
Response.Redirect(HccApp.MembershipServices.GetLoginPagePath());
}
}
}
Expand Down