javascript - Opencart - Images inserted in the product description are http rather than https -
we're using opencart 1.5.5.1 (i know it's outdated version, previous developers here hard coding core files, it's not possible upgrade latest version @ moment).
i've been going through whole website, changing occurrences of http://
https://
, , fixing opencart core bugs. example, know issue on checkout page (catalog/controller/checkout/cart.php, line 170):
changed this:
$this->data['action'] = $this->url->link('checkout/cart');
to this:
$this->data['action'] = $this->url->link('checkout/cart', '', 'ssl');
i able prepare of issues easily, mentioned above.
but... problem file manager. whenever i'd link image in product description, using insert image function in wysiwyg editor, automatically creates http://
link, rather https://
. this, of course, breaks ssl on page, , solution i've found far manually alter inserted image links http
https
.
what i've tried... i've gone through file manager's controller file (admin/controller/common/filemanager.php), trying find place image link generated, , seems opencart passing relative path ckeditor's image.js
plugin, creates whole link presume (but i'm not 100% sure this). unfortunately, i'm not great javascript, , image.js
minified. i've tried google before asking, , i've found couple of forum posts issue, none of them have mentioned prepare (or might have missed it).
any opencart gurus around, has encountered same thing, , able point me in right direction, please?
thank much in advance.
edit: have ssl enabled in admin / scheme / settings, , .htaccess file rewrites every http page requests https.
i've managed prepare this. if else having same issue, following:
open admin/controller/common/filemanager.php
. go line 35:
$this->data['directory'] = http_catalog . 'image/data/';
change to:
if (isset($this->request->server['https']) && (($this->request->server['https'] == 'on') || ($this->request->server['https'] == '1'))) { $this->data['directory'] = https_catalog . 'image/data/'; } else { $this->data['directory'] = http_catalog . 'image/data/'; }
i hope helps.
edit: i've checked, , issue still nowadays in 1.5.6.4, might actual prepare else well.
javascript php ssl ckeditor opencart
No comments:
Post a Comment