I’ve been at this all day and cannot seem to wrap my head around it. If anyone can please help me understand this Velo API Reference - I’d highly appreciate it.
What I am understanding is if I create an ticket repeater (if I could get an example of what they meant by that, that would be great) - and connect the code referenced in Velo’s API - it should open the checkout page once the user selects his tickets and clicks, checkout. If I am wrong please do correct me.
Hello. If you are creating a custom workflow for your wix events pages, you can take a look at how to set up a repeater here: connecting a collection to a repeater
Just to complement what Amanda said. When the documentation talks about a ticket repeater is just a regular repeater where all the tickets will be displayed.
The code snippet in the documentation is doing a query of the tickets’ collection, which returns an array of objects. That array is being assigned as the data of the repeater, that data is then (in the displayTickets() function) assigned to the text elements in the repeater (Name and Price). Also, it assigns the value of the input element for the ticket quantity to 0.
Finally, you have the functions to reserve, checkout and updatetickets that are triggered by individual buttons inside each item of the repeater. You can see their ID’s in lines 17,18 and 19 of the snippet.
To answer your question, yes, as long as you have all the correct elements inside the repeater and the correct ID’s, the snippet in the documentation should allow you to select and checkout your event tickets.
As a side note, the snippet is looking for an event called My Event (line 29), you need to adjust that too.
Im hoping to be able to interact with the Wix events via code but im unclear because the code has functions to reserve checkout and update tickets. but the velo reference says its read only. https://www.wix.com/velo/reference/wix-events-frontend/tickets
Not clear as to how there could be these functionalities but its read only. appreciate any assistance.