that's bunch of thing i do for SSL in opencart V. 2.2.0.0
1.
Settings->Server) and changed the HTTPS configurations in the main config.php and admin/config files
define('HTTP_SERVER', 'https://uwlcd.com/');
define('HTTPS_SERVER', 'https://uwlcd.com/');
2.
system/config/catalog.php and system/config/admin.php.
$_['site_ssl'] = false;
$_['site_ssl'] = true;
3.
system/library/url.php
if ($this->ssl && $secure) {
$url = 'https://' . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['SCRIPT_NAME']), '/.\\') . '/index.php?route=' . $route;
} else {
$url = 'https://' . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['SCRIPT_NAME']), '/.\\') . '/index.php?route=' . $route;
}
4.
admin/controller/sale/order.php (fix the problem admin unable edit the order through SSL)
850 line changed to
$data['store_url'] = $this->request->server['HTTPS'] ? str_replace("http", "https", $order_info['store_url']) : $order_info['store_url'];
$data['store_url'] = str_replace("httpss://", "https://", $data['store_url']);
after all I do in the top. the css won't show correct in my product :
https://uwlcd.com/iphone4-4s-lcd-screen ... -lcd-black
-----------------------------------------------------------------------------------------
I aslo try some method from forum to fix this , but don't work for me:
1.
I try
catalog/controller/common/header.php on line 27
$data['base'] = $server;
to
$data['base'] = "//mydomain.com";
or
$data['base'] = $server . '/';
2.
catalog/controller/common/header.php on line 17
if ($this->request->server['HTTPS']) {
$server = 'https://'.$this->config->get('site_base');
} else {
$server = $this->config->get('config_url');
}
those 2 won't work for me .
everyone have any idea about how to fix it.
1.
Settings->Server) and changed the HTTPS configurations in the main config.php and admin/config files
define('HTTP_SERVER', 'https://uwlcd.com/');
define('HTTPS_SERVER', 'https://uwlcd.com/');
2.
system/config/catalog.php and system/config/admin.php.
$_['site_ssl'] = false;
$_['site_ssl'] = true;
3.
system/library/url.php
if ($this->ssl && $secure) {
$url = 'https://' . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['SCRIPT_NAME']), '/.\\') . '/index.php?route=' . $route;
} else {
$url = 'https://' . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['SCRIPT_NAME']), '/.\\') . '/index.php?route=' . $route;
}
4.
admin/controller/sale/order.php (fix the problem admin unable edit the order through SSL)
850 line changed to
$data['store_url'] = $this->request->server['HTTPS'] ? str_replace("http", "https", $order_info['store_url']) : $order_info['store_url'];
$data['store_url'] = str_replace("httpss://", "https://", $data['store_url']);
after all I do in the top. the css won't show correct in my product :
https://uwlcd.com/iphone4-4s-lcd-screen ... -lcd-black
-----------------------------------------------------------------------------------------
I aslo try some method from forum to fix this , but don't work for me:
1.
I try
catalog/controller/common/header.php on line 27
$data['base'] = $server;
to
$data['base'] = "//mydomain.com";
or
$data['base'] = $server . '/';
2.
catalog/controller/common/header.php on line 17
if ($this->request->server['HTTPS']) {
$server = 'https://'.$this->config->get('site_base');
} else {
$server = $this->config->get('config_url');
}
those 2 won't work for me .
everyone have any idea about how to fix it.
Attachments
wrong-path-load-css.png (120.09 KiB) Viewed 6532 times
really $data['base'] = "//mydomain.com"; not help?
are you install any extensions? may be refresh mods? http://opencart.nedorogoi-internet-maga ... esh&token=...
are you install any extensions? may be refresh mods? http://opencart.nedorogoi-internet-maga ... esh&token=...
The site might have a bad rewrite in htaccess.
Once a visitor gets into a product page, the page is trying to pull css and js files from this location...
2 examples but there are many others too.
https://uwlcd.com/iphone4-4s-lcd-screen ... ap.min.css
https://uwlcd.com/iphone4-4s-lcd-screen ... 1.1.min.js
The 'iphone4-4s-lcd-screen' should not be in the paths.
It's possible a rewrite is causing this to happen. See attachment.
Once a visitor gets into a product page, the page is trying to pull css and js files from this location...
2 examples but there are many others too.
https://uwlcd.com/iphone4-4s-lcd-screen ... ap.min.css
https://uwlcd.com/iphone4-4s-lcd-screen ... 1.1.min.js
The 'iphone4-4s-lcd-screen' should not be in the paths.
It's possible a rewrite is causing this to happen. See attachment.
Attachments
Bad path - bad_path.png (56.31 KiB) Viewed 6530 times
This .htaccess file should not have problem. my another website https://8pmshop.com is using the same .htaccess .
and my another website is opencart 2.2.0.0 , I forget what another part I make change to fix this.
and my another website is opencart 2.2.0.0 , I forget what another part I make change to fix this.
Code: Select all
RewriteCond %{HTTP_HOST} ^www\.uwlcd\.com [NC]
RewriteRule ^(.*)$ https://uwlcd.com/$1 [L,R=301]
RewriteCond %{HTTPS_HOST} ^www\.uwlcd\.com [NC]
RewriteRule ^(.*)$ https://uwlcd.com/$1 [L,R=301]
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
You tried a lot, I suggest to try one more, in header.php
refresh modification cache after!
Code: Select all
$data['base'] = $this->config->get('config_store_id') == 0 ? HTTPS_SERVER : $server;
Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+
Thanks!
artcore wrote:You tried a lot, I suggest to try one more, in header.phprefresh modification cache after!Code: Select all
$data['base'] = $this->config->get('config_store_id') == 0 ? HTTPS_SERVER : $server;
It seems like not matter what I change for header.php . it won't have any influence .
Just checked your site. Your base href is empty. Make sure you have
in header.tpl for your template!
Code: Select all
<base href="<?php echo $base; ?>"/>
Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+
Thanks!
artcore wrote:Just checked your site. Your base href is empty. Make sure you havein header.tpl for your template!Code: Select all
<base href="<?php echo $base; ?>"/>
thanks . yes , this is empty , so I decide just change common/header.tpl , <base href="<?php echo $base; ?>"/> to <base href="https://uwlcd.com"/>
it's much easier for me.
They're the same if you have a single store.
I see it works now at least
Cheers
I see it works now at least
Cheers
Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+
Thanks!
THIS WORKED FOR ME "THANK YOU"artcore wrote: ↑Tue Dec 20, 2016 5:45 amYou tried a lot, I suggest to try one more, in header.phprefresh modification cache after!Code: Select all
$data['base'] = $this->config->get('config_store_id') == 0 ? HTTPS_SERVER : $server;
8pmshop wrote: ↑Tue Dec 20, 2016 11:34 pmartcore wrote:Just checked your site. Your base href is empty. Make sure you havein header.tpl for your template!Code: Select all
<base href="<?php echo $base; ?>"/>
thanks . yes , this is empty , so I decide just change common/header.tpl , <base href="<?php echo $base; ?>"/> to <base href="https://uwlcd.com"/>
it's much easier for me.
[/quot]
This is the one works. not the other one
<base href="<?php echo $base; ?>"/>
to
<base href="https://mysite.com/"/>
Who is online
Users browsing this forum: No registered users and 142 guests