Home › Forums › Ticket Products › Community Tickets › Limit event tickets to one per user
- This topic has 12 replies, 5 voices, and was last updated 6 years ago by Cliff.
-
AuthorPosts
-
March 22, 2018 at 2:57 pm #1486491VukParticipant
Hi guys,
Is there any way (configuration, code snippet, anything) to limit number of tickets per user to 1 per event?
The idea is to allow only one ticket (application) per user since these events are free, and one can only apply for himself.
Also, is there a way to pre fill user data (first and last name, email) if they are logged in ? (take a look at an attachment if you don’t know what i mean)
Thanks a lot
Hope to hear from you soonVuk
March 23, 2018 at 7:46 pm #1487513CliffMemberHi, Vuk. Check this out:
https://gist.github.com/cliffordp/80b33455779b74ec49f6ea3033cb47bf
For filling the logged-in user’s info, I believe this is coming soon (week or two). I’ll put this thread on the list to be notified once this functionality gets released.
March 24, 2018 at 2:51 am #1487611VukParticipantHi,
Thanks a lot for the first code snippet – works like charm. π
Looking forward to the other feature with pre filled user data π
Thanks
VukMarch 26, 2018 at 1:28 pm #1488940CliffMemberGlad to hear π
March 29, 2018 at 5:32 am #1491542Jaime MarchwinskiKeymasterHi There!
Just wanted to share with you that a new release of our plugins is out, including a fix for this issue π
Find out more about this release β> https://theeventscalendar.com/maintenance-release-week-25-march-2018/
Please update the plugins and let us know if the fix works for your site.
Best,
JaimeMarch 29, 2018 at 5:34 am #1491543VukParticipantI already updated this morning and saw that the issue is solved π
Thanks a lot, great job π
Cheers
March 29, 2018 at 2:35 pm #1492252dmitry zhukParticipantJust for fun π
Tickets produce hidden product.
You can just set in “Inventory” property “Sold individually” to Yes, and you can have ability to sell only one ticket.
Thanks to basic support for products in ticket case.March 29, 2018 at 8:22 pm #1492380CliffMemberThanks for that tip, Dmitry.
Here’s a code snippet using Dmitry’s suggestion, which may be preferable:
https://gist.github.com/cliffordp/9a457b724e38b3036f8d48adc90930ed
However, it only restricts to the checkout, not within a user’s account.
March 30, 2018 at 1:27 am #1492495dmitry zhukParticipantBut I don’t know, this solution working without any coding (snippet). Just as is. And it works not only on check out, but also when you tries to add into cart.
March 30, 2018 at 5:06 pm #1493266CliffMemberRight, Dmitry… just that this snippet makes it so all WooCommerce tickets act as if that box is checked.
March 31, 2018 at 3:36 am #1493425dmitry zhukParticipantProbably I do something wrong, but I have it works π without coding.
I have installed (Community Event, Community Tickets, Event Tickets and Event Tickets Plus).
More over, I install dependencies plugin, which enable create dependence between products, and it works with tickets too. I can sell ticket only I have the other product (I didn’t check dependencies between two tickets, but I think it will work too).
As I think, product validation with this field and other plugins is exists as feature in one of that plugin.
If you want to see, I can give you link to my test site and I can describe (and preconfigure some tickets in English) how I set and what you get.March 31, 2018 at 5:34 am #1493460CliffMemberThe code snippet makes it so you don’t have toΒ manually check the box in WooCommerce product settings for each past and newly-created ticket.
Thanks for your feedback. I’ll close this thread now since the original poster, Vuk, is taken care of.
Have a great weekend.
-
AuthorPosts
- The topic ‘Limit event tickets to one per user’ is closed to new replies.