Pass through "special note" data from external button

Hey everyone - full disclaimer, I am not the coder, so excuse my wrong nomenclature of misunderstandings. Here’s the scenario.
We are trying to have a shop button on our site which kicks the product to Wix. No problem. I was given this piece of code:

import wixLocation from 'wix-location'; import wixStores from 'wix-stores' $w.onReady(function () { if ( { wixStores.cart.addProducts([{ "productId":, "quantity": 1 }]); } })

However, there is something that we NEED this to do, that I can’t quite find any information on. Wix commerce platform has a “special note” field. What I need is for our button to pass through a text value into special note field (ordinarily, this is where a user would put in special instructions of customizations of a product). I can see here there is a variable productID being passed. I can see there is a variable quantity being passed. Is there anything like a variable “specialNote”: whatever? Is there any way to push that data this way so it auto populates from the external button? Thanks!

Hi! I feel like you don’t show all the code, but i think you can try this:

Which means that you probably should try changing


to this

[{"productId":,"quantity":1, "note": "some text"}]

And see if it works or not…

Note - if you want to continue using Velo on your wix site and build more complicated stuff, you need either to bee coder or hire coder

Thanks so much! Oh I understand. I am a programmer so I understand basic programming concepts, but I am not the programmer on this. We do have a programmer, but I have basically been going around in circles for a week to see if this is even possible, if there was an argument for “note” that could be passed through to the store, since it is a field that can exist.

If you think you know of a potential solution for the expressed problem, I’d be open to contracting the help. Feel free to contact me.

Actually, looking at the code example you have linked, it looks like it could be handled with:

“buyerNote”: “This is a note from the buyer.”

This is exactly what I was looking for. Now I’ll see if we can implement it. Thanks!