Jump to content

Add to Cart from External Website in iFrame not working


Recommended Posts

Good evening everybody, it's almost 2 days that i'm running around this problem and i can't find a solution.


Wordpress Website

Prestashop Website


Add a product to Prestashop Cart using an iframe from a wordpress external website


<iframe src="https://www.website.it/index.php?controller=cart?add=1&id_product=1" height="800"></iframe>



Now the strange thing that i need help on, i prepared a web page to let you better understand what happens



Why in the first iframe everything work perfectly and in the second is not?

The first iframe embed a website that i found while browsing for "Prestashop to Wordpress integration addon"



The second iframe embed one of my website that i'm currently using for testing purposes



What do you think?

Thanks a lot


Link to comment
Share on other sites

Its depends upon server settings. There is term called "Clickjacking" (vulnerability) which is used in conjunction with site security.

In the recent times, Most of sites adjust their server settings so that no one can't run their website inside the iframe (That's the reason addons URL is not working).

If PS & WordPress both are your websites & you can control the serer then you can change the "X-Frame-Options" to achieve what you are trying to do. 

Link to comment
Share on other sites

  • 1 year later...

Please try to enable the debug mode and then check the Ajax requests in the Network section by opening the console ( Ctrl + Shift + J ).
And check if there is any error present in the Ajax Request or not.

Also, please check if Cart.php file is overriden on your store or not by checking the below path:

Link to comment
Share on other sites

There have been several suggestions on how to fix the problem all of which cost money with no guarantee they will work! I tried to setup multishop but that did not work. My situation is that I have one shop, which I want to use on about 6 different websites. If I simply post a link to the shop everything is fine, but I want to embed the shop directly into the websites. It works fine showing the front end of the shop, it's only when an order is placed that the problem occurs.  see this link https://paperbriquettepress.com/Block.php

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...