Post by 8pmshop » Tue Dec 20, 2016 3:38 am

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
without-css-picture.jpg

without-css-picture.jpg (103.66 KiB) Viewed 6477 times


-----------------------------------------------------------------------------------------

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.

User avatar
New member

Posts

Joined
Sat Oct 08, 2016 11:27 pm
Location - new york

Post by 8pmshop » Tue Dec 20, 2016 3:40 am

check the picture .

the css path shows https://mydomain.com/catalog/view/javas ... ./boot.css

Attachments

wrong-path-load-css.png

wrong-path-load-css.png (120.09 KiB) Viewed 6474 times


User avatar
New member

Posts

Joined
Sat Oct 08, 2016 11:27 pm
Location - new york

Post by netruxa » Tue Dec 20, 2016 3:48 am

really $data['base'] = "//mydomain.com"; not help?
are you install any extensions? may be refresh mods? http://opencart.nedorogoi-internet-maga ... esh&token=...

User avatar
New member

Posts

Joined
Fri Dec 16, 2016 1:34 pm


Post by tdaubs » Tue Dec 20, 2016 3:51 am

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.

Attachments

bad_path.png

Bad path - bad_path.png (56.31 KiB) Viewed 6472 times


Image
Opencart Support . Opencart Galaxy . Buy Me a Coffee?


User avatar
Active Member

Posts

Joined
Fri Apr 08, 2011 4:51 am
Location - Southern California

Post by 8pmshop » Tue Dec 20, 2016 4:07 am

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.

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}

User avatar
New member

Posts

Joined
Sat Oct 08, 2016 11:27 pm
Location - new york

Post by artcore » Tue Dec 20, 2016 5:45 am

You tried a lot, I suggest to try one more, in header.php

Code: Select all

$data['base'] = $this->config->get('config_store_id') == 0 ? HTTPS_SERVER : $server;
refresh modification cache after!

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+ ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands

Post by 8pmshop » Tue Dec 20, 2016 10:30 pm

artcore wrote:You tried a lot, I suggest to try one more, in header.php

Code: Select all

$data['base'] = $this->config->get('config_store_id') == 0 ? HTTPS_SERVER : $server;
refresh modification cache after!

It seems like not matter what I change for header.php . it won't have any influence .

User avatar
New member

Posts

Joined
Sat Oct 08, 2016 11:27 pm
Location - new york

Post by artcore » Tue Dec 20, 2016 11:00 pm

Just checked your site. Your base href is empty. Make sure you have

Code: Select all

<base href="<?php echo $base; ?>"/>
in header.tpl for your template!

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+ ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands

Post by 8pmshop » Tue Dec 20, 2016 11:34 pm

artcore wrote:Just checked your site. Your base href is empty. Make sure you have

Code: Select all

<base href="<?php echo $base; ?>"/>
in header.tpl for your template!

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.

User avatar
New member

Posts

Joined
Sat Oct 08, 2016 11:27 pm
Location - new york

Post by artcore » Wed Dec 21, 2016 12:37 am

They're the same if you have a single store.
I see it works now at least ;D
Cheers

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+ ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands

Post by globalscope » Sat Aug 19, 2017 4:31 am

Hi, i have the same error. its complicated.. :drunk:

Newbie

Posts

Joined
Fri Aug 18, 2017 2:51 pm

Post by BOBKIM7080 » Thu Jun 20, 2019 8:15 am

artcore wrote:
Tue Dec 20, 2016 5:45 am
You tried a lot, I suggest to try one more, in header.php

Code: Select all

$data['base'] = $this->config->get('config_store_id') == 0 ? HTTPS_SERVER : $server;
refresh modification cache after!
THIS WORKED FOR ME "THANK YOU"

User avatar
New member

Posts

Joined
Fri Aug 26, 2011 12:53 am


Post by BOBKIM7080 » Sat Jun 22, 2019 6:59 am

8pmshop wrote:
Tue Dec 20, 2016 11:34 pm
artcore wrote:Just checked your site. Your base href is empty. Make sure you have

Code: Select all

<base href="<?php echo $base; ?>"/>
in header.tpl for your template!

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/"/>

User avatar
New member

Posts

Joined
Fri Aug 26, 2011 12:53 am

Who is online

Users browsing this forum: No registered users and 40 guests