Insert "Custom Event Field" to PDF invoice (shopping cart)?

  • Svenska Ducatiklubben
  • Topic Author
  • Offline
  • New Member
  • New Member
More
8 months 1 week ago #160255 by Svenska Ducatiklubben
Is there an easy way to get an "Event Custom Field" into PDF invoice (shopping cart)? We need a text string on each row for some events (see attached example with "Kategori: Bankörning MC".

 

I've done it an ugly way now by editing "/emailtemplates/invoice_items.php" with this:
<td>
<?php echo $rowEvent->title; ?> <BR>

    <?php
        if (str_contains($rowEvent->custom_fields, 'MC'))
        {
            echo 'Kategori: Bankorning MC';
        }
        else
        {
            echo '';
        }
    ?>


</td>



Is there a better (less ugly) way?

Cheers!

Please Log in or Create an account to join the conversation.

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
8 months 1 week ago #160259 by Tuan Pham Ngoc
Hi

Unfortunately, code modification will be needed as you did. Please remember to move the modified file to template override PATH_TO_TEMPLATE/html/com_eventbooking/emailtemplates folder so that the change won't be lost when you update to future releases of the extension

Tuan

Please Log in or Create an account to join the conversation.