Post by TROLL » Sat Mar 18, 2017 9:56 pm

site url: flashgels.com

I am experiencing an issue where the "Add to Cart" button for products on the home page does not work with certain browsers. It works everywhere else, but just on the home page it does not work.

The buttons do work when using iOS on my iPhone or Safari from my MacBook, however the buttons do not work when using IE, Firefox, and Chrome. I have not tested others. When trying to click the button, there is no response when using these browsers.

Do you know what the issue might be here? Any help is appreciated, I wasn't able to find much specific to this browser issue searching the forums.

Please let me know if you need any other info, thank you.
Bryan

Newbie

Posts

Joined
Sat Mar 18, 2017 9:51 pm

Post by Johnathan » Sat Mar 18, 2017 10:57 pm

The error showing up in the browser console is this:

XMLHttpRequest cannot load https://flashgels.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 'http://flashgels.com' is therefore not allowed access.
It means you have something on your server that is blocking HTTP requests to non-https URLs. You'll either need to remove that, or force all your URLs to be https. You can find directions on that by searching on Google for "htaccess force URLs to https".

Image
Image Image Image Image Image Image


User avatar
Global Moderator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by victorj » Sun Mar 19, 2017 4:20 am

There is a error in how you set up your config files.

in both config files (root and folder admin) all http should be edited so they become https.

next add a new rewrite rule in your .htacces file at the beginning

Code: Select all

RewriteEngine On
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$ https://flashgels.com/$1 [R=301,L]

Koeltechnische deurrubbers eenvoudig online op maat bestellen.
Alle niet stekplichtige onderdelen zoals scharnieren, sloten, randverwarming en verlichting voor alle typen koelingen en vriezers.
https://koelcel-onderdelen.com

Koeltechnische deurrubbers eenvoudig online op maat bestellen.
Eigen productie en snelle levering.
https://123-deurrubbers.com


User avatar
Newbie

Posts

Joined
Sat Jun 25, 2011 4:09 am
Location - Alkmaar Holland

Post by TROLL » Tue Mar 21, 2017 7:20 am

Thank you for the replies, I am happy to say that it looks like I have been able to correct the issue.
The opencart support ticket I opened was surprisingly unhelpful, but the community forums have saved the day. Much appreciated!

Newbie

Posts

Joined
Sat Mar 18, 2017 9:51 pm
Who is online

Users browsing this forum: Bing [Bot], gsmdelovi and 139 guests