Post by webecho » Fri May 22, 2015 8:57 am

HI Guys
Having a strange issue.
When first loading a clients website, the Add to Cart buttons don't work UNTIL the page is refreshed.
This is happening in IE 11 and the Client reports on an iPhone (I don't have one to test on).

It 'seems' to be down to using Font Awesome and the Cross Origin Resource Sharing (errors showing up in the Console in IE)

Wondering if anyone can help me fix this.

webecho

New member

Posts

Joined
Mon Dec 06, 2010 9:17 am

Post by webecho » Fri May 22, 2015 3:44 pm

Managed to fix this.

In case anyone is having the same issue,

Add

Code: Select all

Header add Access-Control-Allow-Origin "*"
Header add Access-Control-Allow-Headers "origin, x-requested-with, content-type"
Header add Access-Control-Allow-Methods "PUT, GET, POST, DELETE, OPTIONS"
to the .htaccess file.


webecho

New member

Posts

Joined
Mon Dec 06, 2010 9:17 am

Post by nexus85 » Sat May 30, 2015 4:29 pm

webecho wrote:Managed to fix this.

In case anyone is having the same issue,

Add

Code: Select all

Header add Access-Control-Allow-Origin "*"
Header add Access-Control-Allow-Headers "origin, x-requested-with, content-type"
Header add Access-Control-Allow-Methods "PUT, GET, POST, DELETE, OPTIONS"
to the .htaccess file.


webecho
I have the same problem in IE11, but even when I refresh the add to cart button doesn''t work.

I tried your sollution but it had no effect. Hope you can help. It''s on site nextimewinkel.com

Ontwikkeld de site Kluizen Discount


New member

Posts

Joined
Wed Jan 27, 2010 4:40 pm

Post by viethemes » Mon Jun 01, 2015 10:27 pm

I have taken a look at your store. The add to cart buttons work properly.

http://www.viethemes.com - OpenCart turtorials, news, tips and stricks, extension

Our extensions:
Visual Theme Editor - Powerful tool for customizing style of any theme visually
Live Theme Editor - Customize layout, colors, backgrounds, fonts of the default theme
Theme Animation - Animation Editor for any theme

Extra Positions PRO, Custom JavaScript, Custom CSS and others


User avatar
Active Member

Posts

Joined
Thu Jan 08, 2015 12:17 pm


Post by burrito » Tue Jun 02, 2015 2:32 am

this is a cross domain resource problem, we've discussed this extensively on github.
the problem is that you are probably using 2 accesspoints to your website (www and non-www) since your store is installed on one of the 2, it will not work completely on the other. after a redirect to a new url on the store (by following a link) you will be redirected to the www or non-www that the store is installed on and the problem fixed.

Solution is one of these:
- setup hosting so the www / non-www redirect is done correctly
- setup htaccess to redirect correctly

to summarize,
if you install your store on www.domain.com and access it through domain.com it will not work (and the other way around)

Image
Opencart specialist | Our website | Our modules


User avatar
Active Member

Posts

Joined
Tue Dec 15, 2009 6:10 pm
Location - Amsterdam, The Netherlands

Post by nexus85 » Sat Nov 21, 2015 9:16 pm

I still have the problem with the IE and add to cart button, and checkout. I tried is with and without the WWW. I hope there is a solution for it.

The site that doesn't work is kluizendiscount[DOT]com

Ontwikkeld de site Kluizen Discount


New member

Posts

Joined
Wed Jan 27, 2010 4:40 pm
Who is online

Users browsing this forum: No registered users and 3 guests