Notifications
Clear all

Woocommerce add to cart

6 Posts
3 Users
0 Reactions
1,533 Views
Posts: 2
Topic starter
(@lotcommerce)
New Member
Joined: 5 years ago

We will have an iframe (a post from a wordpress site), on a parent page which is also a wordpress site. Two separate domains.  From the iframe we would like to submit a parentdomain.com/?add-to-cart=xx to the parent to add the item to the shopping cart,  is this possible with your product?  Or better yet, is it possible to trigger a jQuery action (onclick maybe) on the parent, from the iframe, that would operate the same as parentdomain.com/?add-to-cart=xx?.  Thanks.

Topic Tags
5 Replies
TinyWebGallery
Posts: 924
Admin
(@admin)
Prominent Member
Joined: 16 years ago

Hi,

you can extract parameters from the parent and add it to the iframe in many different ways: See
http://www.tinywebgallery.com/blog/advanced-iframe/advanced-iframe-pro-demo/url-features

If I read it right you want that the iframe is doing a add to cart in the parent. Correct? Currently the plugin supports that the current url is appended to the url of the parent. 

What you need it that from the iframe a postMessage is sent to the parent and there the add to cart is triggered internally. My plugin than only can offer the communication channel. I have a hook where you can add custom logic on the parent side. But you have to adopt the part where data is sent and also on the parent the logic to the add the item to cart.
So it would be a quit custom solution.
Adding something only to the url of the parent is not doing anything than changing the address bar. 

If I should support you with a custom solution please let me know...

Best, Michael

Reply
Posts: 2
Topic starter
(@lotcommerce)
New Member
Joined: 5 years ago

I understood the first part of what you shared but quite honestly you lost me on the rest of it.  Can you let me know what your requirements are for a custom solution?  Thanks.

Reply
TinyWebGallery
Posts: 924
Admin
(@admin)
Prominent Member
Joined: 16 years ago

Please contact me directly: https://www.tinywebgallery.com/en/about.php

Best, Michael

Reply
Posts: 1
(@annacoblin)
New Member
Joined: 4 years ago

Great got the point.

Reply
Page 1 / 2