I’m trying to build a beat store section to my website (the Project Library) within an already established members area. The Project Library is a dynamic repeater page connected to the Project Library collection, which contains data for all the beats. When a user selects an item in the repeater it takes them to the corresponding item page to select between 2 licence options with different prices.
I have tried this tutorial to generate a transaction on the item page, by putting the button on a repeater and setting the dataset to only show 1 item with no joy. I have tried both with the dynamic dataset and a secondary dataset, filtered to the dynamic one. https://support.wix.com/en/article/corvid-tutorial-using-the-corvid-pay-api-to-collect-payments-for-products-in-a-database-collection
The reason I have not been using wix stores app is because they do not facilitate variants for digital products (I need these for different licence options). I tried adding them as physical products, but this would mean having to manually send download links which would be a hassle and not instant. Also, because the licenses are exclusive, the beats must be removed instantly after sale, which is not possible using the available inventory tracking for product variations.
If I could get the wix pay API working, then i could generate the payment when the button was clicked and once the transaction had been confirmed, query the users ID and add it to the item. This would then enable me to filter the Project Library repeater page dataset to only show items with an empty user ID field (solving the immediate removal problem). It would also mean I could set up a downloads page in the users account and filter by ID so each user only had access to their own downloads.
An alternative would be to create 2 digital product entries for each beat on wix stores app, one for each licence, and then reference the products collection within my Project Library collection, I may be able to add ‘add to basket’ buttons on my Project Library item pages. The user would then complete the transaction using the wix stores framework. I dont know how I could solve the issue of immediate removal ?
Im new to corvid and feel a little out of my depth right now. I’ve got the code reference link and have been looking through it to see what is possible. Any help would be much appreciated. Every developer I speak to just seems to want to get me to ditch Wix, start from scratch and rebuild everything!!