joe_a84 wrote:Hi,
I got this to work in the .cshtml files:
if (Request.IsSecureConnection)
{
Response.Redirect(Request.Url.ToString().Replace("https", "http"));
}
Here is one where I used it:
\Views\Catalog\ProductTemplate.SingleVariant.cshtml
Thanks for the code,
I was having trouble with sessions not being carried over from non-secure to secure (so when an anonymous user added an item to their cart, their cart would be empty).
I modified the code to
@{ if (Request.IsSecureConnection==false)
{
Response.Redirect(Request.Url.ToString().Replace("http", "https"));
}
}
and placed in the variantsingrid file also.