Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
2 Vastaukset
4900 Näkymät

I have an external website where my products from Odoo are shown with a nice design, search engine, and additional functionality which Odoo shop doesn't offer. After selecting a product on this external site, I now need to send the user to my Odoo shopping cart with this product already added.

My question is if Odoo API can create a cart, add products to this cart and then open up the cart web site for the users? Alternatively instead of the cart, a wishlist could be created and filled with products, could that work?

In case this isn't possible I thought of inserting a iframe on the shop page and communicate them using window.postMessage(). So I just could simulate pressing the "Add to cart" button and afterwards send users to their filled cart. What do you think about that solution?

Avatar
Hylkää
Tekijä Paras vastaus

Finally I managed to add a product by simply simulating a click on "Add to cart" button on product page using Javascript:

document.getElementById("add_to_cart").click();
Avatar
Hylkää
Paras vastaus

Hello,

I have the same problem.

How do you inject your code ?

thanks

Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
2
tammik. 25
9359
1
syysk. 24
1353
2
heinäk. 24
1424
2
kesäk. 24
32542
3
toukok. 24
3154