Hi there,
I am developing a mod for our OpenCart 2.3.0.2 stores, and am running into a bit of a problem.
The mod needs to request product details from store A and return them to be displayed on store B, but I assume because it is going cross-domain, it is returning the "No 'Access-Control-Allow-Origin' header is present on the requested resource" error in console.
The mod will be displayed on a subdomain which is setup as a separate store in our multi-store installation, this has to be done for a variety of back-end reasons, unfortunately.
Can anyone point me in the right direction to get this figured out?
The Access-Control-Allow-Origin header and how to use it is described here. https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
However, if the second domain is set up as a multi-store, can you not just access the database directly rather than doing a request to a different domain?
However, if the second domain is set up as a multi-store, can you not just access the database directly rather than doing a request to a different domain?
If Store A and Store B are both located on the same domain, you could use Ajax requests with cross-domains as the ones already integrated in OC with the APIs.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Who is online
Users browsing this forum: No registered users and 141 guests