Vtiger CRM 4.2.x is an Open Source CRM software, used mainly by small and medium-sized businesses. Vtiger CRM can be used to manage your company wide CRM and Inventory Management activities, such as sales force automation, customer support & service, marketing automation, procurement & fulfillment effectively. With SiteGround hosting you can use all vTiger features.
SiteGround has long experience in providing web space for CRM sites. Our vTiger hosting service is the best choice for you for it offers the richest set of features, CRM-expertized support team and lots of FREE tools.
You may use this tutorial for your own use. You may not distribute it in any form without the express permission of the publisher. You may provide a link to the publisher's web site, where this tutorial can be used from. This tutorial is provided free of charge and without any warranty of any kind.
VTiger Installation
How to install Vtiger CRM?
Get a FREE Vtiger installation with SiteGround vTiger hosting Package!
In order to install the Vtiger on a SiteGround hosting account, please follow the instructions bellow:
Now your database is up and ready to be filled in with data. But first you have to upload the Vtiger CRM files to your hosting account. Please, go to http://www.vtiger.com/ and download the latest stable release.
You need to download the LAMP version - it includes only the source code of Vtiger CRM - we have already installed Apache, MySQL and PHP on our servers).
Extract it on your computer - the archive will uncompress to a folder that contains the files of the installation:
vtiger_crm/index.php vtiger_crm/modules vtiger_crm/includes/ vtiger_crm/schema/ vtiger_crm/themes/ etc.
You should have already chosen where Vtiger will be installed on your account. If you want it to be your main website application, you should upload the files and folders of the installation directly inside the public_html/ folder (or www/ - they are the same) of your account. In other words, if Vtiger is to be visible at http://YourDomain.com/, the files should be uploaded inside public_html/ folder.
If you want Vtiger installed in a sub-folder, create one inside public_html and upload all the files there. For example, if Vtiger is to be installed at http://www.yourdomain.com/vtigersite/, please, create the public_html/vtigersite directory and upload the files in there, which should produce similar paths:
public_html/vtigersite/index.php public_html/vtigersite/modules/ piblic_html/vtigersite/cron/ etc.
Have a bottle (or two) of nice beer while the files are being uploaded. :)
vTiger Installation
Finally, you are ready to proceed with the installation. Please, point your browser to the URL where you have uploaded the files. We will assume Vtiger CRM will be your main website, so type www.yourdomain.com in your browser. The steps of the installation process are very straight forward and well-explained, so we will only discuss the most important ones in detail.
Step 1: The Vtiger installation is beginning. If you wish, you may send the Vtiger developer information about you (email and name), if not - click NEXT.
Step 2: The Vtiger installer is making the checks - if everything is fine, you should see some green text (available, writable, version numbers etc.)
Step 3: Database configuration: This is where you tell Vtiger how to access its database. Some time ago, you should have created an MySQL database and user - please enter the details in the boxes provided.
Note, that the name of the database and the username are prefixed with "username_" where username is your cPanel login name.
Do not forget to type in the password of the MySQL user. Remember that it is case-sensitive.
For "Host Name" enter "localhost"; Site configuration: Here you should leave the information as it is - URL: http://www.yourdomain.com/; Path /home/yourcpaneluser/public_html/; Path to the Cache folder : cache/; Admin configuration: username: admin; password: admin (by default).
Click NEXT.
Step 4: Confirm System Configuration: Please check again the system configuration and click "Change" if you need to change some data or "Also populate with Demo Data" if you wish. Click "Create".
Step 5: Here the Vtiger tells us that the configuration file is written successfully (config.inc.php).
Step 6: The vtiger CRM installer now creates the database tables and populates them with demo data. This may take some time (a minute or two). After completion please click "FINISH".
Step 7: Congratulations! Your vTiger is now up and running. Note your administrator username and password (admin/admin by default).
Changing the theme/template with Vtiger is quite an easy task. Generally, you will just have to download the theme archive, extract it to your local computer and upload it to your 'Vtiger/themes' folder. You can find nice themes within the Vtiger official site forum.
First, we will need to find a theme archive to use. For the purpose of this tutorial I have chosen CleanBusiness theme, which is available for free at www.vtiger.com. Please, download CleanBusiness.zip file on your local computer and extract it. This will create a new directory called CleanBusiness.
To make the new theme available for your Vtiger application however, we will have to upload it first. Please, open an FTP connection using your favorite FTP client and navigate to your Vtiger folder. In our case this is the 'www' directory. From there, please enter the themes folder (themes) and upload the whole extracted CleanBusiness/ directory. This will create a new sub-folder with the same name, which will have the following full path: /www/themes/ CleanBusiness .
Once uploaded, please enter your Vtiger login page (www.domainname.com). From the main login page you are able to choose the CleanBusiness theme.
Additionally, you can try changing the theme to one of the 4 already available themes that comes with every default installation of Vtiger.
First, contacts are people related to sales accounts. There is a tab Contacts which brings you to a list with all the contacts. You can add contacts from this page. Contacts may also be added directly from the top-level shortcuts menu on the home page.
By clicking on the link New Contact on the top-level menu you are taken to a page with numerous fields. There you can store quite detailed information about your contact. You don't have to fill all the fields, but the Family Name by which the contact is saved.
Another way to add a new contact is by the shortcut Add Business Card from the Contact menu. The difference is that here are provided less details. There is also a possibility to import a contact from a vCard by uploading the file. The link to this can be found on the Shortcuts menu in Contacts tab.
It is useful to know that Contacts can be exported to a .csv file (Outlook compatible). This is done by checking the box next to the Contact's name and clicking the Export link at the bottom of the list.
How to create accounts in Vtiger CRM?
For managing your accounts, please click on the Accounts tab. Creating account is just as easy as everything else in this very user friendly application. You have a link for creating contacts on your top-level shortcuts menu. It is recommended to fill in as much information as you have so that everyone can benefit from it. Make sure you fill in Account Name as it is used for the name by which the account will be stored.
Creating Leads, Potentials, Invoices, Tasks or scheduling Meetings and Calls is similar to the mentioned above. Just follow the link on the top-level shortcuts menu on the home page. Click on the corresponding tab for more details and operations.
Please note that the Dashboard Chart is not supported in PHP 5!
In vTiger you have the possibility to receive emails at the CRM directly. Before you can receive any email at your CRM you must have setup the access to your receiving email server. The condition is that an user possesses an entrance to an email server outside of the CRM system.
To configure the access to the receiving mail server click on My Home Page -> Emails menu at the navigation area. You do not need administrative privileges for this operation. The email client menu opens, as shown here:
Incoming mail server configuration
Click on the [Settings] icon to open the incoming email server configuration menu.
You have to enter all configuration data as described below.
Email ID
Display Name - You should give each mail server an unique name. This name will be displayed at the mail server account list.
Email - You must enter the email address you use at your receiving mail server. Please use the full email address: username@yourdomain.com Where username is the username of your actual email account and yourdomain.com is your domain name.
Mail Server Settings
Mail Server Name or IP - You must enter the address of your mail server. You may use a name or the IP address. You should use mail.yourdomain.com
User Name & Password - You must enter the user name and the password you use to access the mail server.
Mail Protocol - At the current release only IMAP as your email protocol is supported and fully functional. The POP protocol will be available in the future.
SSL Options - You must select whether you communicate with your email server encrypted or not. Please DO not use this option and select No TLS.
Certificate Validations - If you use encryption to access the mail server you should select whether the certificate is validated. Please select Do Not Validate SSL Cert.
Use Internal Mailer - If configured by your service provider you might use the internal mailer to send emails.
Refresh Timeout - You may change the refresh rate.
Emails per page - You may select the number of emails (webmails) you want to display at a single page.
Outgoing mail server configuration
If you would like to send emails from the CRM system or if you would like to receive notifications you must configure the Outgoing Mail server. To do so, please, click the [Edit] button at the Outgoing Server menu to enter your mail server configuration
Server name - Use mail.yourdomain.com where yourdomain.com is the actual domain name.
Enter the correct login details
Check the box Requires Authentication.
Well done! You have successfully configured your vTiger email settings!
Creating backups of Vtiger CRM and its MySQL database and restoring them
There is no backup tool included in the application.
In order to restore fully your Vtiger CRM you need to have the database restored and the files copied backed to the server.
So first we need to export the database. It can be done from PhpMyAdmin. In order to reach it you have to log in your Cpanel, go to MySql databases and at the bottom of the page is the link to PhpMyAdmin. Exporting your database is simple.
First, on the left side, please choose your Vtiger CRM database. Then click the Export tab. Next select all the tables. From Structure options check also Add DROP TABLE and then click Go. Thus you'll download a sql file on you computer. Now we have the MySql file needed for backups.
We can restore our backup by importing the mentioned sql file into an empty database or into a Vtiger CRM database. In order to do that we go again to our PhpMyAdmin and choose the database we've specified to use with our Vtiger CRM. Then we click on the SQL tab and from the second menu we browse to the sql file on our PC and click Go. If the query is successful our database has been populated with the backup data.
After the database backup procedure we'll proceed with the files. The easiest option is to copy the whole folder with Vtiger CRM from the server to your local PC by FTP. Later when you want to restore your old Vtiger CRM just copy back the files from your pc to the server in the proper folder.
Please, feel free to contact us if you have any questions or recommendations about this tutorial at: tutorials 'at' siteground.com
vtiger CRM - Developer How To's is one of the most frequently visited document in vtiger Wiki. We are periodically moving most of the commonly asked questions from vtiger Forums and Developer Mailing List to this section.
Please help us updating this document by:
1. Answer to the new questions
2. Review the existing Q & A for accuracy (content, grammar, punctuation & spellings, etc.,)
3. Add your own Q & A
4. More...
Attention to Business Community: We have a separate section exclusively for Business Community: Vtiger CRM - How To's
Contents
[hide]
* 1 Activities, Calendars, Events, Notes & Tasks
o 1.1 How to change timezone on server which has different timezone
o 1.2 How to Create A New Notification
o 1.3 How to import Notes
o 1.4 How to set Activities status filter
o 1.5 How to add New Field On Events
o 1.6 How to add a new Activity Type or Event Type
o 1.7 Where is the insert query of a to do/event?
o 1.8 How to Change sort date from Ascending to Descending Date in Activity History
o 1.9 How to - Global update Leads -> Notes
o 1.10 How to resolve problem "Calendar page shows blank screen"
o 1.11 How to Re-create Notifications
o 1.12 How to set the hour view for day as a default
o 1.13 How to resolve error "Cannot redeclare class DateTime"
o 1.14 How to give sharing permission in calendar
o 1.15 How to display Location field of a new Meeting
* 2 Charts & Graphs
o 2.1 How to change titles in the chart of Pipeline By Sales Stage
* 3 Chat
o 3.1 How to add Sound for Chat
* 4 Contacts Related
o 4.1 How to determine if a contact has been marked as deleted
o 4.2 How to save extra data like the user id for every saved contact
o 4.3 How to create another column in the Contact Tab
o 4.4 How to make a column that is displayed sortable
o 4.5 Contacts Export works but Add Message doesn't
o 4.6 How to resolve problem "Unable to enter Contacts"
* 5 Customer Portal
o 5.1 How to change the default "assign to" for the customer portal and the corresponding email
o 5.2 How to fix the Customer portal address in response email
o 5.3 How to change ticket detail in Customer portal
o 5.4 How to remove Products from the Customer portal
* 6 Dashboard
o 6.1 How to resolve error message in Dashboard on install
o 6.2 How to resolve problem "Ghost Record in Dashboard"
o 6.3 How to resolve dashboard problem in new install (Fedora Core 4 Updated)
* 7 Database
o 7.1 How to back up data
o 7.2 How to change the crmid in vtiger_crmentity
o 7.3 How to migrate Sugar data to vtiger CRM
o 7.4 How to set up mysql service
o 7.5 How to see the database Schema
o 7.6 How to change the char set for the tables in the MySQL database to CP1251
o 7.7 How to Import using SQL
o 7.8 How to resolve problem "Database not created during Install"
o 7.9 How to back up and restore a 4.2 database
* 8 Email Related
o 8.1 How to make Opt-out default "Yes"
o 8.2 How to change email templates for notifications
o 8.3 How to handle $ truncated text in non-html email
o 8.4 How to set IMAP to not delete email
o 8.5 How to fix issues related to SMTP configuration
o 8.6 How to bulk email outside of vTiger and update records
o 8.7 How to do E-mail notifications translation
* 9 FAQ & HelpDesk Module
o 9.1 How to make the questions & answers in the FAQ module visible
* 10 Fields, Labels, Picklists
o 10.1 How to rearrange the order of custom fields
o 10.2 How to change default field names
o 10.3 How to resolve problem "Can't create picklist"
o 10.4 How to resolve problem "Unable to Update Custom Fields"
o 10.5 How to change a field length
o 10.6 How to change a field label
o 10.7 How to restore picklists after data restore
o 10.8 How to make Translatable Picklists
o 10.9 How to make Translatable Custom field labels
o 10.10 How to set up Auto-increment fields
o 10.11 How to show "read only" on the screen for a custom field
* 11 List Views
o 11.1 how to make custom view columns sortable
o 11.2 Listview: How to change the fields and columns displayed in Listviews
* 12 Detail Views
* 13 Popups
o 13.1 Search in popup: available fields
o 13.2 List of clickable names etc in popup
o 13.3 Calling a popup
* 14 Import, Export, File Uploads
o 14.1 How to view/change the attachment size limit
o 14.2 How to import a CSV file
* 15 Inventory
o 15.1 How to resolve problem "Settings > Inventory Notification produces no valid page"
o 15.2 How to enter and track serial numbers for each item in an inventory
* 16 Invoicing Related
o 16.1 How to set the due date automatically +## days from creation
o 16.2 How to format "Amount" field to include commas
o 16.3 How to stop rounding up the numbers in the quantity field
o 16.4 How to change the default currency
o 16.5 How to remove 2 page in invoice
o 16.6 How to add Invoice ID to list of fields to choose for custom view
o 16.7 How to add the same service a number of times on the same invoice
o 16.8 How to create a unique series of invoice numbers without gaps
o 16.9 How to get the "comment" from the area below product to add to an invoice
o 16.10 Installation & Configuration
o 16.11 How to host vtiger crm in a multitenant fashion
o 16.12 How to resolve Notices after install on Windows SBS2003
o 16.13 How to change or Migrate from one directory to another
o 16.14 How to install vtiger on Ubuntu (in German)
* 17 Leads & Potentials Related
o 17.1 How to determine which tables the Leads and Potentials are saved in
o 17.2 How to sort leads by company name instead of by contact
o 17.3 Localization
o 17.4 How to change the font to support other languages
o 17.5 How to build language packs
o 17.6 How to install new language packs
* 18 Login Page
o 18.1 How to Set the default login module
o 18.2 How to resolve problem getting blank page upon login
o 18.3 How to resolve problem "Unable to login" or "Blank page after login"
o 18.4 How to set username and password as default
o 18.5 How to reset password
* 19 Mail Merge
o 19.1 How to resolve problems merging an uploaded document
* 20 Misc
o 20.1 How to change or enable the settings in FCKeditor
o 20.2 How to remove the Java script edit per field
* 21 Modules
o 21.1 How to configure a filter
o 21.2 How to use variables when creating views
o 21.3 How to change the number of entries per page
o 21.4 How to submit a module for addition to vtiger CRM project
o 21.5 Automatically select a group instead of user on record creation
* 22 Navigation Menu & Tabs
o 22.1 How to hide or remove system details from the user
o 22.2 How to view/modify the Edit and Delete links
o 22.3 How to remove menu items from quick access
o 22.4 How to disable Help and About Us
o 22.5 How to remove main tabs
o 22.6 How to remove the secondary tabs under the main tabs
o 22.7 How to change tab ID
o 22.8 How to edit/modify tab names
o 22.9 How to add or remove Modules from tabs
o 22.10 How to remove dashboard tab
o 22.11 How to remove modules from the dashboard tab
o 22.12 How to create a new module or tab in vtiger 5
* 23 Patching, Subversion
o 23.1 How to use .diff patch
o 23.2 How to use .diff patch on Windows
* 24 PDF Related
o 24.1 How to reverse contact name on PDF layouts
o 24.2 How to change the PDF layout for invoices and quotes
* 25 Quotes
o 25.1 How to create a query to extract the products from a quote using the quote number
* 26 Smarty & Theming
o 26.1 How to find the browser tab image
o 26.2 How to determine what templates are being used
o 26.3 How to remove a theme
o 26.4 How to change default theme
o 26.5 How to create a new Color theme for vtiger CRM 5
* 27 Tags
o 27.1 How to make the tagclouds be organization level
o 27.2 How to have global Tag Clouds as well as user specific Tag Clouds
* 28 Troubleshooting
o 28.1 How to view 'vtigercrm.log' file WITHOUT having Apache root
o 28.2 How to handle dissappearing views in leads, contacts, accounts, and potential
o 28.3 How to resolve very slow performance
o 28.4 How to resolve error "Module name is missing"
o 28.5 How to resolve "Runtime Error #7 - out of memory"
* 29 Trouble Tickets
o 29.1 How to Change Format of Trouble Ticket Basic Info
o 29.2 How to move 'Trouble Tickets' to the Account Information Tab
o 29.3 How to customize Trouble ticket email sending
o 29.4 How to modify the trouble ticket email templates
o 29.5 How to send a copy of the email to the person who opened the trouble ticket
o 29.6 How to turn off notification mails of new tickets
o 29.7 How to resolve problem of duplicate email going to the person who posted the trouble ticket
* 30 Usability
o 30.1 How to disable the Alt-D hotkey in vtiger
* 31 User Related
o 31.1 How to remove "Delete" from custom views
o 31.2 How to set the user's home page
o 31.3 How to restrict users from adding new URL/Websites to this module
* 32 WebForms
o 32.1 How to add/edit a button within the forms
o 32.2 How to resolve problem "Webforms shows blank page"
o 32.3 How to customize vtiger Web Forms
o 32.4 How to call custom fields in a webform
Activities, Calendars, Events, Notes & Tasks
How to change timezone on server which has different timezone
1. Open 'index.php' of [vTiger CRM Installation Folder]
2. Find these codes on the file
global $entityDel;
global $display;
3. Add this code below those lines
putenv("TZ=US/Eastern");
How to Create A New Notification
* Open en_us.lang.php file on [vTiger CRM Installation]/modules/Users/language/
* Add new labels on the file
'LBL_NEWNOTIFICATION_TITLE'=>'New Notification',
'LBL_NEWNOTIFICATION_DESC'=>'New Notification Short Description',
* You may add the translation of these labels to other language files as necessary.
* Insert row into `vtiger_notificationscheduler`
$newnotifyid = $adb->getUniqueID("vtiger_notificationscheduler");
$adb->query("INSERT INTO `vtiger_notificationscheduler`
(`schedulednotificationid`, `schedulednotificationname`, `active`,
`notificationsubject`, `notificationbody`, `label`)
VALUES
($newnotifyid, 'LBL_NEWNOTIFICATION_TITLE', 1, 'Notification Subject',
'This is a reminder notification for ...', 'LBL_NEWNOTIFICATION_DESC');");
* Edit cron/intimateTaskStatus.php and add a new block of code to handle your new notification
How to import Notes
TBS
How to set Activities status filter
You probably need to give permission for users to use that field.
Insert a row into the profile2field table for each profile and one row into the def_org_field table. Here's some SQL to give you an idea of what needs to be done:
INSERT INTO profile2field (SELECT profileid, 9, (SELECT fieldid FROM field WHERE tabid = 9 AND columnname = 'eventstatus'), 0, 1 FROM profile);
and
INSERT INTO def_org_field (SELECT 9, fieldid, 0, 1 FROM field WHERE tabid = 9 AND columnname = 'eventstatus');
How to add New Field On Events
TBS
How to add a new Activity Type or Event Type
See the AddActivityType page.
Where is the insert query of a to do/event?
It comes under common framework. Look in data/CRMEntity.php file for all modules insert query.
How to Change sort date from Ascending to Descending Date in Activity History
Open include/RelatedListView.php for editing and go to code at around line 396:
//Appending the security parameter
global $current_user;
$rel_tab_id = getTabid("Calendar");
Add this line after line 407 (the last line shown above)
$query .= ' ORDER BY vtiger_activity.due_date DESC ';
How to - Global update Leads -> Notes
vtiger 4.2 OS - RedHat
Overview: We wanted to be able to update the LEADS>NOTES when we sent out an email marketing campaign. As there isn't a mass-mailer tool within vtiger, we have to script the mailouts and the related database inserts.
1. the mailer script
2. the format of the mailing list itself
3. the update script
marketing_mailer.sh
#!/bin/sh
# "Marketing_Mailer.sh" for marketing campaigns - all associated files are in the same directory.
# Tuesday February 13th 2007
# Usage: ./marketing_mailer.sh emails_and_firstname.txt
for i in $maillist
do
EMAIL=`echo $i | awk -F: '{ print $1 }'`
NAME=`echo $i | awk -F: '{ print $2 }'`
echo "sending email to ($NAME) at ($EMAIL)"
mutt -F /admin/marketing_email/Feb20/muttrc -s "mail-shot subject" $EMAIL -a attachment.pdf <Dear $NAME,
!EOF
done
The muttrc file I call is so that the email doesn't show as coming from 'user@server' but rather the person I specify.
muttrc
# To ensure that mutt does not put 'username@localhost.localdomain in From
set from="user@example.com"
set use_from=yes
set envelope_from="yes"
set editor=vi
The email list is a file with format email_address:first_name. Example:
* email_campaign will be my note title in vtiger.
* email_body will be the note contents.
* user '148' is a user called 'admin' that I created specifically for these mass updates.
mass_notes_dbupdate.sh
#!/bin/sh
# Make certain the EMAIL_LIST file contains addresses that are in vtiger!
EMAIL_LIST=./email-list.txt
EMAIL_CAMPAIGN="20070220_Email"
EMAIL_BODY=" \
Email body text here
\
Name
Sig. "
# DO NOT CHANGE BELOW HERE
for i in `cat $EMAIL_LIST`
do
echo "Updating CRM with note for $i"
mysql -uusername -ppassword --host=mysql_host database_name <
set autocommit=0;
commit;
insert into notes
(notesid, contact_id, title, filename, notecontent)
select id, 0, '$EMAIL_CAMPAIGN', null, '$EMAIL_BODY'
from crmentity_seq;
insert into senotesrel (crmid, notesid)
select ld.leadid, cs.id
from leaddetails ld, crmentity_seq cs
where ld.email = '$i';
commit;
!EOF
done
How to resolve problem "Calendar page shows blank screen"
This problem may occur due to following reasons:
1. Use of php short tags. Ensure that the files calendar_share.php and addEventUI.php do not have any short tags.
1. Unsupported PHP version. Currently, vtigerCRM is not tested with PHP 5.2. Downgrade your PHP.
How to Re-create Notifications
New Events and tasks with send notification, are not sending notifications.
Just add a task from the main calendar view -> Add -> Task When you save it even with send notification checked, NO notification will be sent. However if you then edit the task or event leaving the send notification checked, when you click Save, a notification WILL be sent.
How to set the hour view for day as a default
In modules/Calendar/new_calendar.php, replace the following line
$viewBox = 'listview';
with
$viewBox = 'hourview';
How to resolve error "Cannot redeclare class DateTime"
This appears to be a conflict with PHP 5.2.0.
1. Edit modules/Calendar/Date.php to make these two changes:
a. Change
class DateTime
to
class com_vtiger_DateTime
b. Search and replace
new DateTime
with
new com_vtiger_DateTime
at about a dozen places in Date.php.
2. Edit modules/Calendar/Appointment.php -- search and replace as per "b" above, two occurrences.
3. Edit include/utils/RecurringType.php -- same search and replace, several times.
http://forums.vtiger.com/viewtopic.php?t=11832&postdays=0&postorder=asc&start=20
How to give sharing permission in calendar
To give sharing permission, go to Calendar Settings (use Settings icon next to Open Calendar icon in Calendar Header). It will display a small popup layer consisting of two sections: Time Settings and Calendar Sharing. In the Calendar Sharing section, select the users to give sharing permission. Enable the Mark Public field in the create event form. Now all the events which are marked as public will be displayed in shared users calendar.
How to display Location field of a new Meeting
Include the following lines of code in your Smarty/templates/ActivityDetailView.tpl after the description field (near line 136):
{if $LABEL.location neq ''}
{$LABEL.location}
{$ACTIVITYDATA.location}
{if}
Charts & Graphs
How to change titles in the chart of Pipeline By Sales Stage
TBS
Chat
How to add Sound for Chat
Add an exec() statement to launch external sound file.
For example, to add a play sound feature when a private message is started:
Edit modules/Contacts/vtchat.php and add the following code after function showPopup() before the closing :
var soundfile="Notify.wav" //path to sound file, or pass in filename directly into playsound()
function playsound(soundfile){
document.getElementById("soundeffect").innerHTML= "