Hello, I have a function that allows logined-in user add items to cart, on add-to-cart click I want the Items to be submitted to the database collection I created. Ihis errors keeps coming up when I clicked on add-to-cart button.
Snip Error from the console: Add-To-Cart funtion: Function that create userItems in my Collection:
const promise = databases.createDocument('[DATABASE_ID]', '[COLLECTION_ID]', '[DOCUMENT_ID]', [DATA]);
Your create document function should be formatted like above. You're missing a parameter.
https://appwrite.io/docs/references/cloud/client-web/databases#createDocument
From the createUserItems function it shows I declared all the four params
This is what i was looking at
Since to me, this seems to be the function that is throwing the error for no data.
Thank you Kenny error resolved. I noticed I was not passing databaseId, documentId to my try block.
[SOLVED] Unable to submit the cartItems to my Database collection.
Recommended threads
- Weird permission failure
when creating an account I use following methods: ``` Future<void> register(String email, String password, String username) async { final user = await accoun...
- Function domain not available
Hello, even tho in docs you clearly describe that every function has its domain, I can not see it anywhere in any of my projects. How do I reveal the url of th...
- Paused project can't activate
I have failed to reactivate one my projects which had been paused