I need a feature like below for add to cart button in wix store
To hide the add to cart button if a user has already purchased the product linked with it, you can use the getMember() function in the page’s onReady() function to retrieve the ID of the current user viewing the page. Then query() the Stores/Orders collection and filter by the buyerInfo field using the member ID. This will return orders on your store made by that user.
If any of the orders contain that product, then hide() the “add to cart” button and show() the other one.
I am thinking that there may be an error in filtering data from wix store
Hello. Can you please post your code snippet in a code block? It will be easier to read. I’m also not completely sure what the question is. Can you explain what you are trying to do and what in your code is not working?