cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Embed IFrame in SAP Commerce shop storefront

former_member596578
Participant
0 Likes
1,007

Dear experts,

I'm currently trying to embed SAP LP data per IFrame into a SAP Commerce storefront as described here: https://blogs.sap.com/2021/05/05/embed-landing-pages-in-your-first-party-company-page-with-iframes/

Whenever we try to reach the SMC LP data the following error is shown in the browser console:

"XMLHttpRequest at >LP-URL< from origin >Shop-URL< has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource."

I tried to add the shop URL to trusted domains in SAP IAS connected to the SMC tenant we use (without https, otherwise it won't be recognized as a valid domain) but without success in resolving the error. Of course the URL (with and without https) is also maintained in SMC IFrame allowance list as described in the linked blog.

Can anyone help resolving this issue?

BR
Nils

Accepted Solutions (0)

Answers (2)

Answers (2)

maik_bosch
Contributor

Hi n.walter

important is to republish the page after the changes in SMC Iframe allowance list. Otherwise the list is not updated.

In Browser web developer tools you can also have a look for the header: 'Access-Control-Allow-Origin' to see which URLs are maintained here.

Br

Maik

former_member596578
Participant
0 Likes

Thanks for the quick response maik.offerle,

trying it right now!

BR

Nils

0 Likes

Hi Nils,

Consider the following for your requirement.

1. add domain url in SMC Content repository Configuration app in SMC

2. Validate that you are using the correct communication arrangement and communication system configuration.

You can find more information about the integration of forms in the following SMC help content

If the form is published externally, the required communication agreement is SAP_COM_0023

BR
JJR