Post by Khwezi » Fri Feb 14, 2020 12:08 am

Good Day
I have been stuck with the following problem with opencart 3.0.2.0 for the past 8 months as a result i am stuck and i am loosing hope.
My issue is the ajax loader loading over httpss as well as ocfilters, kindly view the following code.
The Ajax loader seems to be loading over https, but when i force https in the config the error occurs thus i can not fully make my site secure.
the source page shows the following httpss error.

Code: Select all

<div id="product-category" class="container layer-category">
    <div class="layered-navigation-block"></div>
    <div class="ajax-loader">
    
<img src="httpss://domain.com/image/catalog/AjaxLoader.gif" alt="" />

Code: Select all

    </div>
    <ul class="breadcrumb">
                    <li><a href="https://domain.com/index.php?route=common/home">Home</a></li>
                    <li><a href="https://domain.com/Electronics">Electronics</a></li>
                    <li><a href="https://domain.com/Electronics/laptops-computers">Laptops &amp; Computers</a></li>
            </ul>
    <div class="row"><aside id="column-left" class="col-sm-12 col-md-3">
			<div class="panel panel-default layered-container">
    <div class="panel-heading layered-heading">Filter</div>
    <div class="layered">
        <div class="list-group">
            <div class="filter-attribute-container filter-attribute-remove-container">
                                                            </div>
            <div class="filter-attribute-container">
                <label>Price</label>
                <div class="list-group-item">
                    <div class="filter-price">
                        <div id="slider-price"></div>
                        <div class="slider-values">
                            <span>R</span>
                            <input id="price-from" disabled="disabled" class="input-price" type="text" value="4228" placeholder="Min" name="price-from"/>
                            <span></span> -
                            <span>R</span>
                            <input id="price-to" disabled="disabled" class="input-price" type="text" value="13959" placeholder="Max" name="price-to" />
                            <span></span>
                        </div>
                    </div>
                </div>
            </div>
                    </div>
    </div>
    
<input type="hidden" class="filter-url" value="httpss://domain.com/index.php?route=product/ocfilter/category&path=67" />
<input type="hidden" class="price-url" value="httpss://domain.com/index.php?route=product/ocfilter/category&path=67" />
Last edited by straightlight on Fri Feb 14, 2020 3:58 am, edited 1 time in total.

Newbie

Posts

Joined
Wed Apr 11, 2018 4:10 pm

Post by OSWorX » Fri Feb 14, 2020 12:37 am

Is that a new protocoll httpss ?
Never heard of it!

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by Khwezi » Fri Feb 14, 2020 1:06 am

OSWorX wrote:
Fri Feb 14, 2020 12:37 am
Is that a new protocoll httpss ?
Never heard of it!
No it is not a protocol rather an error created when https is forced via the config.php.
When i test it on whynopadlock.com it shows me the following error. An image with an insecure url of "httpss://domain.com/image/catalog/AjaxLoader.gif"

Newbie

Posts

Joined
Wed Apr 11, 2018 4:10 pm

Post by Khwezi » Fri Feb 14, 2020 1:19 am

Khwezi wrote:
Fri Feb 14, 2020 1:06 am
OSWorX wrote:
Fri Feb 14, 2020 12:37 am
Is that a new protocoll httpss ?
Never heard of it!
No it is not a protocol rather an error created when https is forced via the config.php.
When i test it on whynopadlock.com it shows me the following error. An image with an insecure url of "httpss://domain.com/image/catalog/AjaxLoader.gif"
I did manage to remove the httpss error manually, but this was futile as the filters still did not work

Newbie

Posts

Joined
Wed Apr 11, 2018 4:10 pm

User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by Khwezi » Fri Feb 14, 2020 3:08 am

xxvirusxx wrote:
Fri Feb 14, 2020 2:53 am
You store URL?
Please help me it feels like my dream is slipping away from me. https://usaam.co.za

Newbie

Posts

Joined
Wed Apr 11, 2018 4:10 pm

Post by Khwezi » Fri Feb 14, 2020 3:12 am

Khwezi wrote:
Fri Feb 14, 2020 3:08 am
xxvirusxx wrote:
Fri Feb 14, 2020 2:53 am
You store URL?
Please help me it feels like my dream is slipping away from me. https://usaam.co.za
The error occurs on this page https://usaam.co.za/Electronics/laptops-computers

Newbie

Posts

Joined
Wed Apr 11, 2018 4:10 pm

Post by xxvirusxx » Fri Feb 14, 2020 3:20 am

Fix the .htaccess redirect issue if you already changed all http instances in https from both configs

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by Khwezi » Fri Feb 14, 2020 3:26 am

xxvirusxx wrote:
Fri Feb 14, 2020 3:20 am
Fix the .htaccess redirect issue if you already changed all http instances in https from both configs
Thank you very much for your response and help, please note i am new at this and my php skills are not very good.
Please take a look at the .htaccess file and where should i edit it?

Code: Select all

# 1.To use URL Alias you need to be running apache with mod_rewrite enabled.

# 2. In your opencart directory rename htaccess.txt to .htaccess.

# For any support issues please visit: http://www.opencart.com

Options +FollowSymlinks

# Prevent Directoy listing
Options -Indexes

# Prevent Direct Access to files
<FilesMatch "(?i)((\.tpl|.twig|\.ini|\.log|(?<!robots)\.txt))">
 Require all denied
## For apache 2.2 and older, replace "Require all denied" with these two lines :
# Order deny,allow
# Deny from all
</FilesMatch>

# SEO URL Settings
RewriteEngine On
# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/


RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=extension/feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=extension/feed/google_base [L]
RewriteRule ^system/storage/(.*) index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]

### Additional Settings that may need to be enabled for some servers
### Uncomment the commands by removing the # sign in front of it.
### If you get an "Internal Server Error 500" after enabling any of the following settings, restore the # as this means your host doesn't allow that.

# 1. If your cart only allows you to add one item at a time, it is possible register_globals is on. This may work to disable it:
# php_flag register_globals off

# 2. If your cart has magic quotes enabled, This may work to disable it:
# php_flag magic_quotes_gpc Off

# 3. Set max upload file size. Most hosts will limit this and not allow it to be overridden but you can try
# php_value upload_max_filesize 999M

# 4. set max post size. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value post_max_size 999M

# 5. set max time script can take. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_execution_time 200

# 6. set max time for input to be recieved. Uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_input_time 200

# 7. disable open_basedir limitations
# php_admin_value open_basedir none
Last edited by straightlight on Fri Feb 14, 2020 3:57 am, edited 1 time in total.
Reason: Added code tags.

Newbie

Posts

Joined
Wed Apr 11, 2018 4:10 pm

User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by jnan » Fri Feb 14, 2020 12:54 pm

Hello,
Greetings!!

I can help you.
PM Sent, Kindly check

Regards
Anna J

New member

Posts

Joined
Wed Sep 13, 2017 11:27 pm

Post by Khwezi » Fri Feb 14, 2020 3:14 pm

xxvirusxx wrote:
Fri Feb 14, 2020 3:31 am
viewtopic.php?t=183503
Thank you so much for your advise, unfortunately modifying the .htaccess file did not work.

Newbie

Posts

Joined
Wed Apr 11, 2018 4:10 pm

Post by xxvirusxx » Fri Feb 14, 2020 3:37 pm

Sure you have?:

1. Use SSL Enabled in Settings

2. Same https in catalog config

Code: Select all

<?php
// HTTP
define('HTTP_SERVER', 'https://you_site.com/');

// HTTPS
define('HTTPS_SERVER', 'https://you_site.com/');

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by Khwezi » Fri Feb 14, 2020 3:45 pm

I can't believe such a small error such as an extra S on HTTPS is ruining the functionality of the shop. I am about to throw in the towel with this. It's so heart breaking :(

Newbie

Posts

Joined
Wed Apr 11, 2018 4:10 pm

Post by xxvirusxx » Fri Feb 14, 2020 4:21 pm

Yes, because httpss doesn't exist...
Check you PM.

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by OSWorX » Fri Feb 14, 2020 4:40 pm

Khwezi wrote:
Fri Feb 14, 2020 3:45 pm
I can't believe such a small error such as an extra S on HTTPS is ruining the functionality of the shop. I am about to throw in the towel with this. It's so heart breaking :(
Well, that's why I have asked what kind of protocol this should be!
Was sarcastic.

General, the extra "s" comes from a modified, manual edited file.
Either the config.php or the .htaccess.
I do not understand why you do not know what you (ar any other person) did.

Simply remove that s and it should be okay.
Or hire a professional if you are not able to fix that by yourself.
You have posted your problem already here in the commercial forum, so anybody who is replying could be a potential candidate for that job.
Simply choose one and write him a message (PM) or contact him/her over his/her website.

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by Khwezi » Fri Feb 14, 2020 5:32 pm

Thank you all for your advise and assistance, i don't give up easily but after 8 months of going through research and going through the forums, rebuilding the shop and breaking it, has taken a toll on me. I had a similar issue in opencart 2 but i managed to resolve it with relative ease. It was an Ajax loading php code that had to be modified. I don't understand why its so hard in opencacrt 3. Thank you all once again, i will revise my options and take the best possible course

Newbie

Posts

Joined
Wed Apr 11, 2018 4:10 pm

Post by sw!tch » Sat Feb 15, 2020 6:33 am

The problem is most likely the theme and the ocmods it installs, not opencart. Some 3rd party themes don't properly use opencart methods for linking assets or urls. They sometimes use their own SSL check along with str_replace() to switch urls to https, for example if you have your HTTP_SERVER defined as https://example.com/

Code: Select all

define('HTTP_SERVER', 'https://example.com/');  // used in config.php

echo $url =  str_replace('http', 'https', HTTP_SERVER);

// result httpss://example.com/
^ When theme developers do stuff like this, it's how you can end up with with the extra s.

Full Stack Web Developer :: Send a PM for Custom Work.
Backup and learn how to recover before you make any changes!


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm

Post by OSWorX » Sat Feb 15, 2020 4:33 pm

sw!tch wrote:
Sat Feb 15, 2020 6:33 am
The problem is most likely the theme and the ocmods it installs, not opencart. Some 3rd party themes don't properly use opencart methods for linking assets or urls. They sometimes use their own SSL check along with str_replace() to switch urls to https, for example if you have your HTTP_SERVER defined as https://example.com/

Code: Select all

define('HTTP_SERVER', 'https://example.com/');  // used in config.php

echo $url =  str_replace('http', 'https', HTTP_SERVER);

// result httpss://example.com/
^ When theme developers do stuff like this, it's how you can end up with with the extra s.
Thank you for this tipp.
Never thought that a "developer" who should know what he is doing, make a replacement like that!

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by Khwezi » Sun Feb 16, 2020 2:03 am

sw!tch wrote:
Sat Feb 15, 2020 6:33 am
The problem is most likely the theme and the ocmods it installs, not opencart. Some 3rd party themes don't properly use opencart methods for linking assets or urls. They sometimes use their own SSL check along with str_replace() to switch urls to https, for example if you have your HTTP_SERVER defined as https://example.com/

Code: Select all

define('HTTP_SERVER', 'https://example.com/');  // used in config.php

echo $url =  str_replace('http', 'https', HTTP_SERVER);

// result httpss://example.com/
^ When theme developers do stuff like this, it's how you can end up with with the extra s.
@sw!tch you are correct because when i modify this code and remove the (s) i get https: yet the is something i am missing because the filter still will not work

Newbie

Posts

Joined
Wed Apr 11, 2018 4:10 pm
Who is online

Users browsing this forum: ianradnor089, paulfeakins and 21 guests