How to add Cart button on iframe

Hi I need to add cart button on external html project, i need add some elements of my external page store to my principal cart when I click on button, the problem is my external page in the frame was build in html5 and js, I dont have the posibility to add vitext packages.

thanks a lot for any help you can offert.

Does this work for you?

Thanks a lot bruno but this doesn’t work for my, I have a json list of products on iframe vtex complement, so I don’t have the possibility to add this data to url in the specific part of the user.

Would be great if you can add a visual representation of data communication, from where to where you need to pass data, I’ve got a lot of questions like: is this iFrame from external project opened inside existing vtex project? if yes then you can pass data somehow through JS using pixel kind of app - you’ve got access to variables and so on…If it’s external project and there’s only a button, and if you click on it it should take some effects on vtex app (adding items/deleting) you need an API integration of external client…I would need an exactly representation of what do you need to achieve

1 Like