• Resolved burzlbaum

    (@burzlbaum)


    Hi I really like this plugin and just bought the Pro-Version.

    Im already happy with the Ticket-Templates, I use the DIN A4 Template as a start and I already changed a bit. But I would like to get the Ticket Image 300×300 next to the Ticket Information. Right now there is the QR code.

    The Ticket Image is at the bottom under my theme header. But I can’t find the image in the code. How can I switch the position of the QR code and the Image?

    Thank you very much and keep up the good work

    Martin

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter burzlbaum

    (@burzlbaum)

    I guess here is no support. I wrote an email and got an reply in the next 24h.

    If someone else is interested in the solution:



    Dear Martin,

    The header, footer and logo is automatically placed. If you want to change this, then do not use the options for the images.

    You can add img-tags with a full qualidied URL to the image. The PDF library will add it then. You can checkout the second template how you could use table-tag to position the elements. Not all HTML is supported, but most of it and CSS too.

    You can expose the value with TWIG in ticket designer test template.

    {{ item.get_meta_data|json_encode() }}

    Or brutal: 

    {{ METAOBJ|json_encode() }} 

    This will show your the meta data construct, so that you get the meta name to get the right meta data of the item.

    To inspect the values of the order items use this code within the ticket template test designer:

    {% for item_id, item in ORDER.get_items %}
    {{ item.get_meta_data|json_encode() }}
    {% endfor %}

    Your Vollstart Support Team,

    Best regards
    Vollstart Support Department
    Plugin Author Vollstart

    (@sasonikolov)

    Hi Martin, thanks a lot for getting the Pro version — great to hear you’re already customizing the DIN A4 ticket template!

    You’re right: the ticket image (300×300) is placed at the bottom by default, under the theme header, while the QR code is in the main section. If you’d like to swap their positions or display the ticket image next to the ticket information, here’s what you can do: How to move the ticket image next to the QR code or ticket details

    The ticket image is represented by the variable:

    {{ TICKETIMAGE }}
    

    This tag is usually placed near the bottom of the default template. Step-by-step:

    1. Go to WooCommerce → Settings → Event Tickets → Ticket Template Designer
    2. Look for the test area where your current template code is.
    3. Find the line that contains {{ TICKETIMAGE }} (probably at the end of the template).
    4. Move that line up into the section where the ticket information or QR code is printed.

    For example, you can place it next to the QR code like this:

    <table width="100%">
      <tr>
        <td width="50%">
          {{ TICKETIMAGE }}
        </td>
        <td width="50%">
          {{ QRCODE }}
          <br>
          Ticket ID: {{ CODE }}
          <br>
          Name: {{ ORDER.get_formatted_billing_full_name }}
        </td>
      </tr>
    </table>
    

    That will show the ticket image on the left and the QR code with info on the right. Optional Tips

    • You can control the image size via inline CSS, for example: <img src="{{ TICKETIMAGE }}" width="300" height="300">
    • Make sure you’re using the test area first and enable the option wcTicketTemplateUseDefault after you’re happy with the layout.

    Let me know if you need help adjusting the layout further or adding more fields.

    And of course, you can always contact support at [email protected] if anything gets tricky.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Change Ticket Image location’ is closed to new replies.