Adding a script to add to cart within iframe

Adding a script to add to cart within iframe

michaeljihb
Visitor
1 0 0

I am trying to add a function: Add to cart, within a 3d visualizer iframe.

Here is the code I have so far: 

Virtual |||
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title> Demo Virtual Tour </title>
<meta
name="viewport"
content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no" />
</head>
<body>
<div id="coohomApp"></div>
<iframe
class="vsr-container"
src="https://www.coohom.com/pub/tool/panorama/pano-b2c-demo?obsPlanId=3FO43INF3PP8&userId=120&targetOrigin=https://www.therangehoodstore.com"
></iframe>
</body>
<script>
window.addEventListener (
"message",
function (event) {
console.log(
event.data.event,
event.data.data
);
},
false
);
</script>

<style>
.vsr-container {
width: 100vw;
height: 100vh;
}
</style>
</html>
Replies 0 (0)