i want to insert through a button into a database the name and the image of the product from the product page in a code that i have to fill the -----
export function addtowishlist_click_1() {
wixdata.insert(-------------) }
anyone can help me ?
i want to insert through a button into a database the name and the image of the product from the product page in a code that i have to fill the -----
export function addtowishlist_click_1() {
wixdata.insert(-------------) }
anyone can help me ?
Hi Elie, we’ve just open to a small group of users the ability to have Wix Stores Products exposed as database collection (and other APIs). I can open these abilities for you as well. what is your url? (or one of your urls) thanks!
https://2kplus.wixsite.com/2kplus this is my url
Elie- you’re in
how can i get the name from $w(“#dataset1”).getCurrentItem() to insert it in the other collection ?
thank you for your support
Hi Elie,
Hers’s how you do it: $w(“#dataset1”).getCurrentItem().name
Having said that, keep in mind that if you’re looking for something which uniquely identifies a product, it’s best if you don’t use name, as multiple products might have the same name.
You can use id or slug which are unique:
$w(“#dataset1”).getCurrentItem()._id
$w(“#dataset1”).getCurrentItem().slug
Please let me know if you have any questions!
Thanks,
Oded
Hello!! A friend is working on Integration between my WIX Store and DEAR INVENTORY SYSTEM. Could you please allow us to enter this BETA group you mentioned so he can work on this?? This is the current store address: https://nelsonestradaaw.wixsite.com/goodfarms-store
Thanks in advance!!!
No?
Hi nelsonestrada.aw, you’re in the Beta. would love to get Feedback in here: Stores on Code
Can you please add me? My URL is https://www.evoessentials.com/
We also need our Wix code Database collection to be connected to the Store products. Please add us to the Beta version. Our site link is https://alamssaira.wixsite.com/mysite-8.
Thank you in advance.
I would love to be in Beta too : https://aumotorfairing.wixsite.com/mysite-1
This is already opened to everyone - go ahead and try it out
I saw that, but in another topic Neta-lee mentioned a code that allows to get collections array of the product using code. I thought it is a part of a next part of API which is tested now.
I’m sorry but this isn’t available yet - you cannot get the collection list of a product
You can however filter the products and get only the ones from a specific collection
How?
wixData.query(“Stores/Products”).hasSome(“collections.id”, [“62d6aa3c-51d8-2fd7-98c8-bf6f862ac0e5"]).find()
You can apply the same for a datsset
Please change the collection id to one of your collection ids. You can get the collection ids by opening the collections table on the left hand and unhiding the id column.
Thanks,
ODed
Hello I also need to insert products at “Stores/Products” but is this only possible from the page and cannot do it with insert?