Post by bairn1 » Mon Feb 05, 2018 4:56 pm

Hi there,

I recently enabled SSL on my OpenCart installation, and although most things seem to be working fine there are a few issues.

Firstly, the admin login page isn't styled properly, with the javascript error of...

less-1.7.4.min.js:13 Failed to load https://[mydomain].com/admin/view/javascript/bootstrap/less/bootstrap.less: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://www.[mydomain].com' is therefore not allowed access.

Secondly, the "add to cart" button on the main home page doesn't work, and changes the cart to say "loading", with a similar javascript error...

(index):1 Failed to load https://[mydomain].com/index.php?route=checkout/cart/add: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://www.[mydomain].com' is therefore not allowed access.

The strange thing is that if I go to any other page and then back to the home page, it all works fine?!

Any advice would be greatly appreciated.

Many thanks,

Gary

Newbie

Posts

Joined
Sun Jul 19, 2015 11:10 pm

Post by straightlight » Mon Feb 05, 2018 6:34 pm

No OC version posted. .htaccess configuration issue, not an OC issue. Contact your host to properly configure your .htaccess file with SSL.

The most generated errors being found on Opencart forum originates from contributed programming. The increased counters are caused by posted redundancies of the same solutions that were already provided prior.

F. Rules:

- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804


Regards,
Straightlight


Legendary Member
Online

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 6 guests