iFuel is Now Part of the Amsive Family! Read More

Running a Magento Site in an iFrame

Ok, I guess the first question is, “why would you?”

Well, as it happens, there are affiliate marketers that will launch the Magento site in their iFrame. One such example is Payment Wall (http://www.paymentwall.com).

So the problem here is that IE (pretty much all versions) won’t pass the Magento session cookie back to the server if the site’s running in an iFrame. No session cookie, no login, no how.

The fix is pretty simple – though it took me a long time to find it!

Add the following to your .htaccess file and, poof, IE sends your cookies back and everybody’s happy!


# Added the following header to enable cookies coming to the site while being hosted in an iframe
Header set P3P “policyref=”/w3c/p3p.xml”, CP=”NOI DSP COR NID CUR ADM DEV OUR BUS””


2 Responses to “Running a Magento Site in an iFrame”

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>