Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi there!
I have an issue, where I cannot add a product to a cart through an API.
I am building a chatbot that provides a personalised recommendation for a product detail. To order such product I use Globo Product Option to get clients wishes (text area attribute). I've tried multiple options how to get the client's customised product to the cart, but I am yet to find a working solution.
The closest I got was to get or create a cart and populate it with a product through API from chatbot's side, but there is a problem - the cart created/found by the API is not matching the user's session on the website.
Then I tried to get the cart token from the websites' side and managed to do it, but failed to pass the token to the chatbot.
Any ideas or suggestions how I should proceed?
Thanks!
It's probably because you're creating the cart before the customer adds anything to the cart.
Have you tried using cart transform functions instead?
https://shopify.dev/docs/api/functions/reference/cart-transform
Hey! I think those are only available for Shopify Plus users, which I don't have.
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024