Links on Ticket Don't Work

Home Forums Ticket Products Event Tickets Plus Links on Ticket Don't Work

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #947032
    Erika
    Participant

    I’ve just been testing my first ticket creation and have run a few orders. Everything appears to be working OK, apart from the fact that the venue details are incomplete on the email ticket (postcode doesn’t appear, which is vital for sat navs) and the venue links on the email ticket don’t work. This makes the ticket pretty useless as a means of checking information before setting out for the event.

    All the necessary information is correctly stored within the app – it just doesn’t appear on the ticket. I don’t have sufficient technical ability to risk playing around with class-ticket-email.php to resolve the problem.

    Any help you can provide will be appreciated.

    #947222
    Barry
    Member

    Hi Erika,

    Apologies for letting you down here.

    The venue link issue is something we are aware of and all things being equal a fix will arrive in our very next release.

    The good news is that to fix this and to make other customizations, such as adding a postcode/zip code (you’re right that this is not present by default, but it can easily be added) does not require you to play with class-ticket-email.php or indeed modify any core plugin code whatsoever.

    A great overview of setting up template overrides can be found in our Themer’s Guide, but in essence you would grab a copy of:

    the-events-calendar/views/tickets/email.php

    Place the copy within your theme, as follows:

    your-theme/tribe-events/tickets/email.php

    You can modify this new file and make changes there without impacting on the core plugin code – which is a safer way to do things.

    Repairing the venue URL

    For this fix, find these lines within your template override (I’ve abbreviated the code within the style attributes a little to save space – what we’re interested in though is the initial href attribute):

    <a href="#" style="..."><?php echo $venue_email; ?></a><br />
    <a href="#" style="..."><?php echo $venue_web; ?></a>

    Modify this to:

    <a href="mailto:<?php esc_attr_e( $venue_email ) ?>" style="..."><?php echo $venue_email; ?></a><br />
    <a href="<?php esc_attr_e( $venue_web ) ?>" style="..."><?php echo $venue_web; ?></a>

    That should provide you with functional links.

    Adding the postcode

    To add the venue postcode to the email, decide where you want it to appear and try inserting this code:

    <?php echo tribe_get_zip( $venue_id ) ?>

    For instance, you could expand this block of code:

    <?php echo $venue_address; ?><br />
    <?php echo $venue_city; ?>

    To:

    <?php echo $venue_address; ?><br />
    <?php echo $venue_city; ?><br />
    <?php echo tribe_get_zip( $venue_id ) ?>

    Does that help at all?

    #948311
    Erika
    Participant

    Hi Barry,

    The modification to add a postcode to the link worked thanks, but after having entered the other relevant modified code as directed, the venue link is still not clickable/functional.

    #948741
    Barry
    Member

    Would it be possible for you to copy the contents of your custom tickets/email.php template to a service like Pastebin or Gist and share the link here so I can take a look at your changes?

    #948773
    Erika
    Participant

    I’ve copied my custom email.php to Pastebin here:

    http://pastebin.com/9WL3pJPD

    Thanks.

    #948830
    Barry
    Member

    Hi Erika,

    So that looks good to me with two caveats:

    • If your venue URL does not include the protocol (ie, “http://&#8221; or “https://&#8221; at the start) it will not function quite as expected, so please ensure your venue URLs are complete – or else you could make a further adjustment to the template to add the protocol if it is missing
    • I completely forgot that the venue email field is not actually a field that exists by default, which is why you see nothing there (and we’ve slated that same part of the default tickets email for removal in the next release)

    Does that help at all/clarify things?

    #953425
    Barry
    Member

    Hi! It’s been a while so I’m going to go ahead and close this thread. If we can help with anything else, though, please don’t hesitate to create new threads as needed. Thanks

    #966757
    Leah
    Member

    Hi there,

    Thank you for your support and patience while we worked on this issue. We are happy announce that we have incorporated a fix into our upcoming 3.10 release. Keep an eye out for a release announcement on our site and for updates available on your WordPress dashboard.

    While we have thoroughly tested this release and are confident of its quality, it is impossible to account for every edge case in the wide world of WordPress. If you run into trouble with the new version or you don’t see your reported issue corrected, please start a new thread and we will be happy to work with you.

    Thanks again for your patience here. We’re excited to get this version out the door and into your hands!

    Best,
    The Events Calendar Team

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Links on Ticket Don't Work’ is closed to new replies.