Post by kchaitas » Thu Feb 22, 2018 10:21 pm

I have installed ssl in my site which is opencart 1.5.6.1.
i have alredy install the certificate
i have changes the config.php in the root directory from http to https
i have changed the admin/config.php from http to https
i have change to yes the parameter in system-settings-server (use SSL).

all images after ssl installation are broken and the checkout after the cart procedure is not opening

Can you help me???

Newbie

Posts

Joined
Thu Feb 22, 2018 10:14 pm

Post by IP_CAM » Fri Feb 23, 2018 2:12 am

ROOT config.php change:

Code: Select all

<?php
// HTTP
define('HTTP_SERVER', 'https://www.bigmax.ch/shop/');
define('HTTP_IMAGE', 'https://bigmax.ch/shop/image/');
// HTTPS
define('HTTPS_SERVER', 'https://www.bigmax.ch/shop/');
define('HTTPS_IMAGE', 'https://bigmax.ch/shop/image/');
ADMIN config.php change:

Code: Select all

// HTTP
define('HTTP_SERVER', 'https://www.bigmax.ch/shop/admin/');
define('HTTP_CATALOG', 'https://www.bigmax.ch/shop/');
define('HTTP_IMAGE', 'https://bigmax.ch/shop/image/');
// HTTPS
define('HTTPS_SERVER', 'https://www.bigmax.ch/shop/admin/');
define('HTTPS_CATALOG', 'https://www.bigmax.ch/shop/');
define('HTTPS_IMAGE', 'https://bigmax.ch/shop/image/');
Add this VqMod to your vqmod/xml/... Directory:
restore_http_image_plus_size.xml

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<modification>
<id><![CDATA[HTTP_IMAGE + HTTPS_IMAGE Links and Sizes]]></id>
<version><![CDATA[OS v.1.5.6.x]]></version>
<vqmver><![CDATA[2.4.1]]></vqmver>
<author><![CDATA[Ernie - IP_CAM]]></author>
<file name="catalog/model/tool/image.php">
<operation error="log">
<search position="replace"><![CDATA[return $this->config->get('config_ssl') . 'image/' . $new_image;]]></search>
<add><![CDATA[return HTTPS_IMAGE . $new_image . '" width="' . $width . '" height="' . $height;]]></add>
</operation>            
<operation error="log">
<search position="replace"><![CDATA[return $this->config->get('config_url') . 'image/' . $new_image;]]></search>
<add><![CDATA[return HTTP_IMAGE . $new_image . '" width="' . $width . '" height="' . $height;]]></add>
</operation>                  
</file>
<file name="catalog/controller/payment/skrill.php,catalog/controller/total/voucher.php,catalog/model/checkout/order.php,catalog/model/openbay/ebay_product.phpcatalog/model/tool/image.php" error="skip">
<operation error="log">
<search position="replace"><![CDATA[$this->config->get('config_url') . 'image/']]></search>
<add><![CDATA[HTTP_IMAGE]]></add>
</operation>
<operation error="log">
<search position="replace"><![CDATA[$this->config->get('config_ssl') . 'image/']]></search>
<add><![CDATA[HTTPS_IMAGE]]></add>
</operation>
</file>
</modification>
Change BIGMAX.CH to your Server Name, and if you use your
Url without www, reverse all the config.php content above accordingly.
You will then have your image Links 'handled' like coming from a subdomain, and
this will improve performance ratings as well.
Good Luck ! ;)
Ernie

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
Who is online

Users browsing this forum: No registered users and 17 guests