Adding products at checkout page

comme
New Member
1 0 0

Hi there, how can I achieve adding a product on the checkout page? I've tried using the AJAX Cart API to add the product, but when moving to the next step of the checkout (e.g. Information -> Shipping), it reverts back to the old cart without the added product.

I've also been trying to do this with the storefront API. The thinking behind it was to grab the current checkout id and make a mutation to the line items. However, I'm starting to think this is incorrect as I can't find the id argument for the Checkout Node. Is creating a checkout with the query, mutation { checkoutCreate(...) } the only way to return a checkout id?

Any help or advice is appreciated, thanks!

 

0 Likes