Add another column to the PDF export file

  • Chris Moyses
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
22 hours 22 minutes ago #176934 by Chris Moyses
Add another column to the PDF export file was created by Chris Moyses
Hi
Would it be possible to add the membership number to the pdf export.  This would make to file content more meaningful

Regards

Chris

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

More
17 hours 6 minutes ago #176935 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Add another column to the PDF export file
Hi Chris

Unfortunately, the fields display in PDF export is not configurable. You will need to modify code to add the information you want to the file. The file you need to modify is components/com_osmembership/view/common/tmpl/subscriptions_pdf.php

Use the code echo OSMembershipHelper::formatMembershipId($row, $config); to display Membership ID

Once the modification is done, you should move the modified file to template override so that the change won't be lost when you update to future releases of the extension

Regards,

Tuan

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

  • Chris Moyses
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
1 hour 16 minutes ago #176950 by Chris Moyses
Replied by Chris Moyses on topic Add another column to the PDF export file
Hi Tuan

Thanks for your response

Is this the code I have to change, will I have to reduce the % on the other columns, to give room for the membership number

<tr>
<td width="3%" style="text-align: center;"><?php echo $i++; ?></td>
<td width="8%"><?php echo $row->first_name; ?></td>
<td width="10%"><?php echo $row->last_name; ?></td>
<td width="20%;"><?php echo $row->plan; ?></td>
<td width="17%" style="text-align: center"><?php echo $row->from_date . ' / ' . $row->to_date; ?></td>
<td width="16%"><?php echo $row->email; ?></td>
<td width="9%" style="text-align: center;"><?php echo $row->created_date; ?></td>
<td width="6%" style="text-align: right;"><?php echo $row->amount; ?></td>
<th width="8%" height="20">
<?php
switch ($row->published)

Use the code echo OSMembershipHelper::formatMembershipId($row, $config); to display Membership ID

Do I have to use OSMembershipHelper to edit the file?

Once the modification is done, you should move the modified file to template override so that the change won't be lost when you update to future releases of the extension

Where do I find the template override?

Regards

Chris

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

Moderators: Tuan Pham Ngoc