unique ID generation

Home Forums Ticket Products Event Tickets Plus unique ID generation

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1124748
    Dylan
    Participant

    First I just want to say thanks for adding this to the most recent update it is a great feature! I’m hoping this isn’t too complex a question and you can point me in the right direction for making a slight change to it. Is it possible to change it so that the numbering is based upon the product_id rather than event_id. Basically i’d just like it to be able to number multiple types of tickets with a different prefix from the same event.

    #1124822
    George
    Participant

    Hey Dylan!

    Thank you for the kind words. First, when you say, “I just want to say thanks for adding this to the most recent update”, can you clarify what “this” refers to? What feature are you referring to, specifically?

    Next, you say, “Is it possible to change it so that the numbering is based upon the product_id rather than event_id.” Can you clarify the “it” here, too? What specific numbering are you referring to?

    Sorry to respond to your questions with other questions; I just want to make sure I completely understand your question so that I can best provide an answer to it! 😀

    — George

    #1124828
    Dylan
    Participant

    Sure I am referring to this in the most recent updates release notes.
    Event Tickets Plus 4.2
    “Tweak – Added event tickets unique ID generation to have human-readable event ticket identification hashes across events (Thanks to Matt Broffman for submitting this idea on UserVoice!)”

    #1125096
    George
    Participant

    Sorry for my misunderstanding there, @Dylan—thanks for confirming what feature you are referring to.

    Reworking the ID generation is technically possible, i.e. you can in theory change it, but at this time it would be a very involved code customization to make for two main reasons:

    1. You cannot make the changes by simply using actions and filters; in other words, you would have to modify core plugin code directly, which is something we strongly recommend against because you have to manually re-implement the customizations after each plugin update. (Because plugin updates overwrite existing core plugin code.)

    2. The ID system is touched upon by several other systems that power tickets functionality. So, in other words, it’s not just an aesthetic change even if it may seem like one.


    With all this being said, while we cannot help with code customizations, if you are curious to learn more I can tell you where to look in the Events Tickets Plus codebase anyways:

    • You’ll want to start by reading through this class within the Event Tickets Plus plugin files: Tribe__Tickets_Plus__Meta__Unique_ID — this is responsible for generating the IDs and assigning them to tickets, as well as keeping track of the ticket sequences to ensure that their ticket numbers are in correct order.

    • The class above relies on this other class, which you’ll also want to read: Tribe__Utils__Post_Root_Pool

    I won’t be able to provide specific insights on the code from here; you’ll have to take the reins and tinker and explore on your own or with the help of a hired developer. (We have a list of great developers here, by the way → http://m.tri.be/18k1, and we have no affiliation with any of these folks–they’re simply some well-respected names in the community that we’ve compiled).

    I hope this information helps!
    George

    #1131897
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘unique ID generation’ is closed to new replies.