With the AV Contract Module for Blesta, your customers can generate the contract for commissioned data processing via their customer area and then send it to you signed in printed form. The module only provides the basis for your customers to create the contract, it does not contain a prefabricated and ready-to-use AV contract.
System requirements
To use the AV Contract Module, the following requirements must be met:
- Runnable Blesta 5.8 installation
- Admin access to Blesta
- Ioncube Loader installed (at least version 12)
- PHP 7.4 or 8.1
- FTP access
Installation
- Upload the module files to your webspace and then activate the plugin in the admin area of Blesta
- Then click on Manage and make a few settings for the module there and store the licence code
- If you want the module to send email notifications, please activate the corresponding checkbox. The e-mail template for the customer can be edited in the e-mail template area of Blesta, the template is called: AV Contract Confirmation
- Then please go to the module in the Blesta admin area and store your AV contract there. The contract stored under “Default” is used if no separate contract text has been stored for the customer’s language.
- Adapt the supplied template files pdf_footer_rename.tpl and pdf_header_rename.tpl for PDF creation, replacing the “rename” in the file name with the company ID from Blesta with which you want to use the template files. Example: pdf_footer_1.pdf. If you use several companies in your Blesta installation, you can create and use separate footer and header files for each company. You can work with HTML in the template files, the PDF generator dompdf also partially supports CSS.
- The module automatically generates a menu item in the customer area. If you do not want this, you can deactivate it via the Blesta module overview using the Settings button.
Available variables
Contract text
The following variables are available for the contract text:
$kid = Customer number
$frstname = Client first name
$lastname = Last name of the customer
$clientcompany = Client company
$address = Address of the customer
$postcode = Postcode of the customer
$city = City of the customer
$country =Country of the customer
$current_date = Current date
$owncompany = Your company name
$contract_created_from_ip = Contract created by IP
$contract_created_at = Contract created on
$data_category = Contract created on
$afected_data = Affected
E-Mail Template
The following variables are available for the e-mail template “AV Contract Confrmaton”, which is sent to the customer upon confirmation of receipt of the signed contract.:
$create_date = Creation date of the contract (date when the customer generated the contract via the customer area)
$first_name = Client first name
$last_name = Last name of the customer
Own variables
The type of data and for the persons concerned, own variables can be stored in order to expand these data fields according to your own wishes. Please proceed as follows:
- Open the clint_main.pdt file of the module(views/default/)
- Search for the form block
<?php $this->Form->create($this->base_uri . 'plugin/av_contract/client_main/index/', ['id' => 'index']); ?>
below<strong><?php $this->_('ClientMain.client_email'); ?>:</strong> <?php echo $av_contract_details_email; ?>
- If, for example, you want to extend the type of data, append the following after the block:
<div><input id="kind-3" class="checkbox-custom" name="kind-3" type="checkbox"><label for="kind-3" class="checkbox-custom-label"><?php $this->_('ClientMain.contract_data'); ?></label></div>
another block in this format at:<div><input id="kind-4" value=kind-4" class="checkbox-custom" name="kind[]" type="checkbox"><label for="kind-4" class="checkbox-custom-label"><?php $this->_('ClientMain.custom_kind_4'); ?></label></div>
- Open the language file client_main.php in the language directory of the module and extend it with a language string named
$lang[‘ClientMain.custom_kind_4’] = ‘NEW DATA TYPE”; - Repeat for each record you want to add (increasing kind-4 by 1 with each new record)
- To expand the data field of the persons concerned, please proceed in the same way, only replace the “kind” by “betroffen”.
Notes
Multi-Compamny Support
Our module supports the multi-company function of Blesta, which allows you to use several companies with only one Blesta installation. To use our module with multiple companies of your Blesta installation, there are no additional costs. However, our licence system only recognises one company automatically. If you use several companies, please inform us of your additional domains after the module is active for the first company so that we can store them in the licence system.