Page 1 of 1

Cant 'add to cart' until refresh internet explorer

Posted: Fri May 22, 2015 8:57 am
by webecho
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

Re: Cant 'add to cart' until refresh internet explorer

Posted: Fri May 22, 2015 3:44 pm
by webecho
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

Re: Cant 'add to cart' until refresh internet explorer

Posted: Sat May 30, 2015 4:29 pm
by nexus85
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

Re: Cant 'add to cart' until refresh internet explorer

Posted: Mon Jun 01, 2015 10:27 pm
by viethemes
I have taken a look at your store. The add to cart buttons work properly.

Re: Cant 'add to cart' until refresh internet explorer

Posted: Tue Jun 02, 2015 2:32 am
by burrito
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)

Re: Cant 'add to cart' until refresh internet explorer

Posted: Sat Nov 21, 2015 9:16 pm
by nexus85
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