After SSL installed subcategories not working - OC 2.2 (Tried all solutions, non worked)
Posted: Wed Nov 21, 2018 10:11 pm
I know that this topic had been posted many times, but believe me if there was an option to my problem I wouldn't post. I had same problem as user "derv.god" who posted this problem (http://forum.opencart.com/viewtopic.php?f=190&t=160983) and found a solution to it few moments later, but for me this didn't work and I'm getting crazy, because I tried to have a functioning site using SSL and really I tried everything.
Same as "derv.god" everything worked well except subcategories and products shown via subcategories. There were no undefined errors, I could login to admin with no problem whatsoever, there were no errors on checkout page and also I could buy a product and edit an order but the problem was same as his and the solution didnt work for me.
The problem is that HTTPS only works if they are not ending in a forward slash, and if they are in the format of
> https://*.com/page
example:
> https://*.com/page <- works
> https://*.com/product <- works
> https://*.com/page/ <- does not work
> https://*.com/product/ <- does not work
> https://*.com/parent-category/page/2 <- does not work
> https://*.com/parent-category/sub-cat/ <- does not work
> https://*.com/parent-category/product <- does not work
note:
- all these pages are working when in HTTP
- all pages are SEO friendly and have keywords
- I'm using JOURNAL 2
- In derv.gods thread there is a user (second post from bottom) that claims he also has journal installed and derv's solution doesnt work for him, so I guess there might be a problem in that
I changed following:
0. edited htaccess
1. Enabled SSL in Opencart settings
2. in /config.php
3. in admin/config.php
4. in system/config/admin.php and in system/config/catalog.php I set
to TRUE
5. in catalog/controller/common/header.php
I changed
To
Also tried (didnt work)
PS: I had to reverse all these changes I made so site could function properly for shoppers for now.
IF ANYONE HAS ANY IDEA, I WOULD APPRECIATE YOUR HELP <3
Same as "derv.god" everything worked well except subcategories and products shown via subcategories. There were no undefined errors, I could login to admin with no problem whatsoever, there were no errors on checkout page and also I could buy a product and edit an order but the problem was same as his and the solution didnt work for me.
The problem is that HTTPS only works if they are not ending in a forward slash, and if they are in the format of
> https://*.com/page
example:
> https://*.com/page <- works
> https://*.com/product <- works
> https://*.com/page/ <- does not work
> https://*.com/product/ <- does not work
> https://*.com/parent-category/page/2 <- does not work
> https://*.com/parent-category/sub-cat/ <- does not work
> https://*.com/parent-category/product <- does not work
note:
- all these pages are working when in HTTP
- all pages are SEO friendly and have keywords
- I'm using JOURNAL 2
- In derv.gods thread there is a user (second post from bottom) that claims he also has journal installed and derv's solution doesnt work for him, so I guess there might be a problem in that
I changed following:
0. edited htaccess
1. Enabled SSL in Opencart settings
2. in /config.php
Code: Select all
define('HTTPS_SERVER', 'https://bylinnekvapky.sk/');
Code: Select all
define('HTTPS_SERVER', 'https://bylinnekvapky.sk/admin/');
define('HTTPS_CATALOG', 'https://bylinnekvapky.sk/');
Code: Select all
$_['site_ssl']
5. in catalog/controller/common/header.php
I changed
Code: Select all
$data['base'] = $server;
Code: Select all
$data['base'] = $server . '/';
Code: Select all
$data['base'] = "//bylinnekvapky.sk";/
IF ANYONE HAS ANY IDEA, I WOULD APPRECIATE YOUR HELP <3