switch between http and https

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
hey guys
im posting this again since no one is helping properly
im on 1.90 and my website is http://www.lebanese-market.com/

after i login with username, it redirects me directly to my homepage but https and says that only secure content is shown but nothing is really not shown

why after login it redirects to https and not to http ?

if i click on anything in categories or new products or product,
it will go back to http but the username and the admin button are not visible and if i add something it will add it to MY CART as if it knows the logged username

is there something we should do ?
the website is not live yet and only the first 2 manufacturers have products but i wish to go live soon

I am not an experienced web developer but i am an IT expert so with little guidance i will find my way around

the below post and all other ssl and https posts DID NOT HELP
https://www.nopcommerce.com/boards/t/8308/ssl-issue.aspx

i found something but i really have no idea how to implement it in my website (if needed)
http://www.codeproject.com/KB/web-security/WebPageSecurity_v2.aspx

thanks again
13 years ago
I replied back here: https://www.nopcommerce.com/boards/t/9421/after-login-user-redirected-to-ssl-homepage.aspx#38222
13 years ago
finally after a week of searching the web about the nopcommerce and SSL errors
i saw that everyone was having the same issue as me
after login the user is redirected to a homepage HTTPS and an error of security is displayed that not everything is secured
this made quite a concern for me and i think for others

so, this is the solution i did and no more error on the https homepage (which was the issue)

you go to master.root.cs and you add the last 2 entries from the below

hope that solves your worries about nopcommerce because it still is one of the best solutions out there
if someone can confirm this

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using NopSolutions.NopCommerce.BusinessLogic.Configuration.Settings;
using NopSolutions.NopCommerce.BusinessLogic.Infrastructure;

namespace NopSolutions.NopCommerce.Web.MasterPages
{
    public partial class root : BaseNopFrontendMasterPage
    {
        protected void RenderAnalyticsScript()
        {
            if (this.SettingManager.GetSettingValueBoolean("Analytics.GoogleEnabled"))
            {
                string googleJS = this.SettingManager.GetSettingValue("Analytics.GoogleJS");
                //string googleId = this.SettingManager.GetSettingValue("Analytics.GoogleId");
                //string analyticsString = string.Format(googleJS, googleId);

                Literal script = new Literal() { Text = googleJS };
                string placement = this.SettingManager.GetSettingValue("Analytics.GooglePlacement").ToLowerInvariant();
                switch (placement)
                {
                    case "head":
                        {
                            this.phAnalyticsHead.Controls.AddAt(0, script);
                        }
                        break;
                    case "body":
                    default:
                        {
                            this.phAnalyticsBody.Controls.AddAt(0, script);
                        }
                        break;
                }
            }
        }
        protected override void OnPreRender(EventArgs e)
        {
            //bind analytics scripts
            this.RenderAnalyticsScript();

            base.OnPreRender(e);
        }
        
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                CommonHelper.EnsureSSL();
            }

        public override PageSslProtectionEnum SslProtected
        {
            get
            {
                return PageSslProtectionEnum.Yes;
            }
        }
    }
}
13 years ago
finally after a week of searching the web about the nopcommerce and SSL errors
i saw that everyone was having the same issue as me
after login the user is redirected to a homepage HTTPS and an error of security is displayed that not everything is secured
this made quite a concern for me and i think for others

so, this is the solution i did and no more error on the https homepage (which was the issue)

you go to master.root.cs and you add the last 2 entries from the below

hope that solves your worries about nopcommerce because it still is one of the best solutions out there


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using NopSolutions.NopCommerce.BusinessLogic.Configuration.Settings;
using NopSolutions.NopCommerce.BusinessLogic.Infrastructure;

namespace NopSolutions.NopCommerce.Web.MasterPages
{
    public partial class root : BaseNopFrontendMasterPage
    {
        protected void RenderAnalyticsScript()
        {
            if (this.SettingManager.GetSettingValueBoolean("Analytics.GoogleEnabled"))
            {
                string googleJS = this.SettingManager.GetSettingValue("Analytics.GoogleJS");
                //string googleId = this.SettingManager.GetSettingValue("Analytics.GoogleId");
                //string analyticsString = string.Format(googleJS, googleId);

                Literal script = new Literal() { Text = googleJS };
                string placement = this.SettingManager.GetSettingValue("Analytics.GooglePlacement").ToLowerInvariant();
                switch (placement)
                {
                    case "head":
                        {
                            this.phAnalyticsHead.Controls.AddAt(0, script);
                        }
                        break;
                    case "body":
                    default:
                        {
                            this.phAnalyticsBody.Controls.AddAt(0, script);
                        }
                        break;
                }
            }
        }
        protected override void OnPreRender(EventArgs e)
        {
            //bind analytics scripts
            this.RenderAnalyticsScript();

            base.OnPreRender(e);
        }
        
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                CommonHelper.EnsureSSL();
            }

        public override PageSslProtectionEnum SslProtected
        {
            get
            {
                return PageSslProtectionEnum.Yes;
            }
        }
    }
}
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.