By default, the second part of the PDF file for the Contract/Agreement, contains a sample content that you can obviously change or remove.

The sample text is contained inside the .INI Translation file for the default language, English. However, it is a good practice to take a look at the Template-File that the system uses for generating the content of the PDF file. The file is the following and you should download it with an FTP client like FileZilla and open it with a good Text-Editor:
/components/com_vikrentitems/helpers/pdf_tmpl.php

At the bottom of the file you will find some comments to help you modify the Contract/Agreement part as well as some code that generates the actual sample content.

By using the special syntax {vri_add_pdf_page} the system will put all the contents below that line onto a different page. You should use that special syntax whenever you need to split the content onto a different page for a better result. This obviously depends on the length of your contract.

If you don't need the PDF file to have a second page containing the agreement then you can just remove the whole code between the following PHP comments for the BEGIN and END:

<?php
//BEGIN: Contract/Agreement Sample Code
?>
{vri_add_pdf_page}
<h3><?php echo JText::_('VRIAGREEMENTTITLE'); ?></h3>
<?php echo JText::sprintf('VRIAGREEMENTSAMPLETEXT', '{customfield 2}', '{customfield 3}', '{company_name}', '{order_date}', '{dropoff_date}'); ?>
<?php
//....... you will find more code here..
//END: Contract/Agreement Sample Code
?>

Otherwise, if you would like to keep that second page with the text for the contract/agreement, you should just edit the default Sample Text contained in the .INI language files.

The block of code described above is the one that generates the whole contract section. By opening the following language files you can find the sample text used by default:

/administrator/language/en-GB/en-GB.com_vikrentitems.ini (this file will be loaded by Joomla! whenever the PDF file will be generated from the administrator section)
/language/en-GB/en-GB.com_vikrentitems.ini (this file will be loaded by Joomla! whenever the PDF file will be generated from the front-end)

If you don't need the contract text to be translated into multiple languages then you can just remove the block of code above and enter your HTML text directly in the template-file. Please notice that you should keep the syntax for placing the text on a different page of the PDF document.

Last Update: 2015-07-07 16:18
Helpful?
50% of people found this helpful.