[Resolved] Moved: add dynamic parameters to the ticket URL

Support Forums Support Moved: add dynamic parameters to the ticket URL

This topic contains 30 replies, has 3 voices, and was last updated by  Brian McDaniel 11 months, 3 weeks ago.

Viewing 15 posts - 1 through 15 (of 31 total)
  • Author
    Posts
  • #107

    Brian McDaniel
    VEM User

    I would like the ability to add dynamic parameters to the ticket URL. I could do this by editing class-event-manager3.php file, but it would of course be overwritten on updating the plugin. Can you see if the developers would be willing to help me with a way to do this? I need the following parameters:

    price (the occurrence first ticket price)
    title (the event title)
    date (the occurrence date)
    location (the occurrence venue)

    This enables me to use the parameters on the page they go to that has a Gravity Form to purchase tickets.

    Please let me know.

    Thanks,

    Brian

    #109

    Drew McManus
    Lead Dev

    Hi Brian,

    Just so I understand, you’re looking to auto populate gravity form fields based on the inbound link used via a VEM occurrence ticket URl field, correct?

    If that’s correct, I can say that it’s likely doable but would fall into a custom programming item on our end. If it does fall into that territory, we can always look at whether it’s something we can package up as a stand alone plugin and therefore qualify for the revenue share program (https://ventureeventmanager.com/pricing/).

    Nonetheless, let’s confirm the outcome here first and I can let you know for certain.

    Drew

    #110

    Brian McDaniel
    VEM User

    I want the link to buy tickets to look like this: http://www.example.com/training/enroll-now/?price=(price)&title=(event title)&date=(occurrence date)&location=(occurrence venue)

    So for the occurrence ticket URL the client just needs to enter http://www.example.com/training/enroll-now/ and the other parameters and values are pulled dynamically and appended to the link. That way the parameter values can be used in the page and Gravity Form to populate fields.

    Does that make sense?

    #111

    Drew McManus
    Lead Dev

    It sure does help, many thanks for confirming. That’s definitely going to be a custom programming item but I’ll let my lead dev take a look and respond.

    #112

    Brian McDaniel
    VEM User

    Sounds good. We are open to paying for custom dev work if it’s within the project budget.

    #117

    Aaron Overton
    Lead Dev

    Hey Brian,

    Let me try to answer your question. (I’m on a trip in Alaska until Tuesday, so only getting online sporadically.)

    Internally, we call each of the bits of data that get assembled into the full display a “chunk”. I don’t remember exactly why. 🙂 Each chunk is represented in the visual layout editor as a draggable piece. The ticket URL is one of those, specifically with the name “vem_dates_ticket_url” (and “vem_dates_ticket2_url”).

    Every chunk, when displayed, goes through a filter. Here’s the line of code:

    return apply_filters('vem_date_chunk', $formatted, $x, $chunk, $o, $event, $meta, $this->context);

    (The filter for page layouts is similar, but ‘vem_page_chunk’.)

    As you can see in the above snippet, you get a bunch of information that we use to created the formatted output. Your function called by add_filter can then return an alternate formatted string. You can either just do some string modification on the $formatted value or reconstruct it fully from the other passed arguments.

    I’m assuming here that you know how to use the add_filter() function in either a plugin or theme functions.php file as that’s standard WordPress functionality. If you need some guidance there (or would like us to help you with some custom coding on that,) let us know.

    Blue skies,
    -Aaron

    #118

    Brian McDaniel
    VEM User

    Thanks, Aaron. I can probably figure this out if you just give me some assistance on the meta names for price, occurrence date & occurrence venue. Or, if it’s not too much trouble, a quote on what it would cost & timeline for you to provide me with the code snippet that would append the parameters to the ticket URL as desired. For time’s sake the latter would be preferable if it’s not too costly.

    Thanks,

    Brian

    #119

    Aaron Overton
    Lead Dev

    Price: vem_dates_ticket_price & vem_dates_ticket2_price
    Date: vem_dates_date_time
    Venue: vem_dates_venue_ID

    All the page chunks are visible in the class-event-manager3.php file, function is getPageChunk(). Occurrence chunks are in the same file, getOccurrenceChunk().

    Drew is the project manager and can private message you about rates and such.

    #120

    Drew McManus
    Lead Dev

    Hi Brian, I’m sending you a direct email shortly.

    #121

    Drew McManus
    Lead Dev

    And thanks again for such a great question.

    #136

    Brian McDaniel
    VEM User

    Is it possible to limit the number of tickets that are available and display this on the front end? Or does this have to be done on the checkout form?

    #137

    Drew McManus
    Lead Dev

    Hi Brian, actual ticking functionality via ecommerce will need to be controlled by whatever ecommerce platform you’re using. However, you can show availability on the frontend via any point where a VEM ticketing link/button appears one of two ways:

    1. Using the “Notes” field and manually edit the values (item, “B” on the creating and editing events documentation page).
    2. Automate that process via some custom programming.

    For option #2, it circles back again to whether your ticketing platform makes it possible to push that information via API. If so, there are a couple of hooks where you can introduce that into VEM.

    Blue skies,
    Drew

    #138

    Brian McDaniel
    VEM User

    Hi Guys,

    I’m working on a different project that is using the custom plugin version 1.0.0 that you made for me previously that adds the price, date and venue as parameters to the ticket URL. It works fine on the link within the Events Module, but it is not adding the parameters on the URLs in the calendar. Is there a quick fix/adjustment that could make it work everywhere?

    Also, I was wondering if there is any way to customize the popup on the calendar. The client wants to show the excerpt and a larger image on the popup, along with removing the “Event Details” text and link altogether. We don’t want the user to ever visit the single event page if at all possible. Possible?

    Thanks!

    Brian

    #139

    Drew McManus
    Lead Dev

    HI Brian,

    Just to be sure I follow, you’re using VEM Pro and the custom code we put together for you via the other project, correct?

    If so:

    1. what’s the URL for this new project where the calendar is being displayed
    2. You’re only using the calendar, not a listing (if you are using a listing, what’s the URL where that lives)?

    If you want to remove the “event details” link from the calendar popups, you can do that with CSS:

    .vem-single-event-url {
        display: none;
    }
    

    You can apply that universally or use calendar’s unique ID to limit it to just that instance. Each calendar generates an ID automatically, you can find it via Inspect Element: https://www.screencast.com/t/AX4PmeyQkUel

    Drew

    #141

    Aaron Overton
    Lead Dev

    Brian,

    There is a filter, vem_get_calendar_data, that lets you make changes to the calendar data before it is sent to the front end. You could, within that filter, add additional data like the excerpt and make modifications to the URL similar to what we did in the more general sense for listings. This filter works for what you want, but isn’t quite as good as the filters we have in the listings area. It’s an area that’s been on my radar for possible improvement.

    Because the calendar dialog is rendered in Javascript rather than in the WordPress system, there isn’t currently any filter to let you change that display. This is something I’ve been thinking of adding, but hadn’t yet because we had never had anyone ask about doing it. UNTIL NOW!

    How that would work, if I were to implement it, would be to add something that looks for a specifically named Javascript object and, if present, pass information to it so it can provide an alternate rendering of the dialog box content.

    We’d need Drew to weigh in on all the schedule, priority, custom vs standard upgrade sort of program manager stuff, but what you are looking for is possible with some updates to the plugin itself.

    Blue skies,
    -Aaron

Viewing 15 posts - 1 through 15 (of 31 total)

You must be logged in to reply to this topic.