Jump to content

Front controller problem with https ajax


Recommended Posts

Good morning, we are trying to make a module and have a problem with a frontController, the problem is that we do a validation data using a frontController, from which we are calling the controller is a page https and the controller resolves http, so this creates a conflict both in form and in a ajax.

 

Is there any way to force the controller to resolve in https or how you think that we could fix it.

 

Sorry for my english and Thanks in advance.

Link to comment
Share on other sites

Looking at the code in the __construct() function of classes/controller/FrontController.php on my PrestaShop v1.6.1.6 test site, it would seem you have to add $this->ssl = true; and set the global variable $useSSL to true to force the controller to resolve in https. You can try that.

	public function __construct()
	{
		$this->controller_type = 'front';

		global $useSSL;

		parent::__construct();

		if (Configuration::get('PS_SSL_ENABLED') && Configuration::get('PS_SSL_ENABLED_EVERYWHERE'))
			$this->ssl = true;

		if (isset($useSSL))
			$this->ssl = $useSSL;
		else
			$useSSL = $this->ssl;
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...