Jump to content

No 'Access-Control-Allow-Origin' header is present on the requested resource.


Shwetab55

Recommended Posts

Hi,

I'm using the Prestashop 1.7

I need to change the "Add to cart" button to "Learn more" with another website's url.

I have made changes for this in the product.tpl, its showing the correct url for Learn button.

but when I click that its loading and showing following error in the console -

"Access to XMLHttpRequest at 'https://xyz' from origin 'https://abc' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource."

I have added the following in the htaccess file but its not working -

 <IfModule mod_headers.c>
   Header set Access-Control-Allow-Origin "https://xyz"
 </IfModule>

Thanks in advance.
 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...