Post by DaveRiba » Tue Oct 20, 2020 2:41 am

Moving forward with a new installation. Still stomping issues.
The issue du moment:
Users can enter the site using either www.MyURL.com or myURL.com
Security Cert is on myURL.com (https://myURL.com)
Regardless of how you enter the site, CONFIG.PHP flips to HTTPS.
So far, so good, but there's a hiccup.

If you enter the site as www.MyURL.com the home page loads as non-secure.
Icons do not display (Add-to-Cart, WishList, etc) and if you click on AddToCart on the home page, you get an 'undefined" error.
Once you move past the home page everything flips to secure. Then if you return back to the home page, everything works.
So, the issue is that the Home Page initial load is not automatically secure.

I have the CONFIG.PHP file set as follows:

// HTTP
define('HTTP_SERVER', 'https://harbor-sales.com/');
// HTTPS
define('HTTPS_SERVER', 'https://harbor-sales.com/');

// DIR
define('DIR_APPLICATION', 'C:/wwwroot/HarborSales/catalog/');
define('DIR_SYSTEM', 'C:/wwwroot/HarborSales/system/');
define('DIR_IMAGE', 'C:/wwwroot/HarborSales/image/');
define('DIR_STORAGE', 'C:/wwwroot/storage/');

What am I missing?
Site is www.harbor-sales.com/index.php (for testing, I don't want the site "live" until I am ready)
OC is 3.0.3.6

As always, thanks for any and all suggestions

Active Member

Posts

Joined
Wed Oct 07, 2020 11:41 pm

Post by IP_CAM » Tue Oct 20, 2020 3:05 am

Something like this OcMod would most likely solve your Problem.
Or then it's content, if you're fluent with implementing such into your OC Code ... :D
https://www.opencart.com/index.php?rout ... n_id=26740
Something for the Admin:
https://www.opencart.com/index.php?rout ... n_id=25465

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<modification>
  <name>Todas as Páginas HTTPS</name>
  <code>tudo-https</code>
  <version>1.0</version>
  <author>Andrei Amorim</author>
  <link>http://www.andreiamorim.com.br</link>
  	<file path="catalog/controller/startup/startup.php">
	<operation error="skip">
	<search><![CDATA[$this->config->set('config_url', HTTP_SERVER);]]></search>
	<add position="after"><![CDATA[$this->config->set('config_ssl', HTTPS_SERVER);]]></add>
	</operation>
	</file>
	<file path="system/config/admin.php">
	<operation error="skip">
	<search><![CDATA[$_['site_ssl']         = false;]]></search>
	<add position="after"><![CDATA[$_['site_ssl']         = true;]]></add>
	</operation>
	</file>
	<file path="system/config/catalog.php">
	<operation error="skip">
	<search><![CDATA[$_['site_ssl']         = false;]]></search>
	<add position="after"><![CDATA[$_['site_ssl']         = true;]]></add>
	</operation>
	</file>
	<file path="system/library/url.php">
	<operation error="skip">
	<search><![CDATA[http://]]></search>
	<add position="replace"><![CDATA[https://]]></add>
	</operation>
	</file>
</modification>

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by DaveRiba » Tue Oct 20, 2020 4:40 am

Interesting
Thank you

Active Member

Posts

Joined
Wed Oct 07, 2020 11:41 pm

Post by Wilburn » Mon Oct 26, 2020 2:40 pm

Hi, I’m trying fixing this in cpanel- is this what I should be doing?

or do you mean to contact support at cpanel? Toys R Us Credit Card

Newbie

Posts

Joined
Mon Oct 26, 2020 2:35 pm
Who is online

Users browsing this forum: Semrush [Bot] and 111 guests