Booking data in QR code attachet to Booking email

WordPress Event Management, Calendars & Registration Forums General Question Booking data in QR code attachet to Booking email

This topic contains 2 replies, has 2 voices, and was last updated by  Stephen Harris 1 year, 2 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #42330

    Hello,

    My question is regarding to EventOrganizer PRO – Booking email.

    I have trouble to pass Booking specific data in QR code attached to Booking confirmation email.
    I have created custom email template, placed it in my custom theme, so far so good.

    I am able to use Booking data specified (such as %booking_reference%, %tickets%, %event_date%, %event_title%) in text part of my custom email.

    But when I try to pass these values in url, QR image is generated without it or not at all.

    QR code is generated dynamically from this code:
    img src="https://api.paylibo.com/paylibo/generator/czech/image?accountNumber=123456789&bankCode=1234&amount=Booking+Value+Here&currency=CZK&vs=BookingRefHere&ss=2023&message=Event+Title+Here" alt="QR code"

    Is there a way I can use/store Booking data and pass it to this part of email please?

    kubaS

    kuba sanitrák
    #42337

    Solved it myself.

    In case anyone ever needs faces similar issue:

    • I registered my own email tags for eo_pro (using file
      “register-email-tags.php”)
    • their values are modified values of default eo email tags
      (event_title, booking_amount) – spaces in strings replaced with “+”
      and striped decimals and currency symbols from amount
    • In html markup of email I then pass these tags and QR image is generated on email submission

    Full markup for generating image with QR code payment instructions here:

    img src="https://api.paylibo.com/paylibo/generator/czech/image?accountNumber=123456789&bankCode=123&amount=%qr_booking_amount%&currency=CZK&vs=%booking_reference%&ss=2023&message=Booking+for+%qr_event_title%" alt="QR code payment instructions"

    Cheers,
    kubaS

    kuba sanitrák
    #42368

    You can achieve this without editing the plug-in files directly (changes to the plug-in will be lost during an upgrade):


    <?php add_action('init', function(){ EO_Email_Template_Tag_Registry::register( 'qr_code', function($tag, $atts, $context ){ $event_id = $context['event_id']; $booking_id = $context['booking_id']; $html = "<p>desired html mark-up</p>" return $html; }); }); <?php endif; ?>

    See also https://wp-event-organiser.com/blog/tutorial/including-custom-fields-confirmation-e-mail/ and on where to put custom code snippets: https://wp-event-organiser.com/blog/tutorial/where-should-i-put-code-from-the-tutorials/

    Stephen Harris
Viewing 3 posts - 1 through 3 (of 3 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.