Archive for the ‘vTiger’ Category

VTiger Webforms Install Guide

March 2nd, 2007

This install guide is best viewed by itself http://mochabomb.com/Docs/VTiger-webforms-Lead.html.

Updated VTiger webforms

March 2nd, 2007

The VTiger webforms is great and I made some updates to it – bring it closer to the great UI of Vtiger 5. I installed the webforms (with much thanks to “rhoobler” of the Vtiger forums for for making it into a joomla component here).

Excitedly I entered some test info, submitted and … dropdown values were lost and the error feedback was pretty minimal – works, but webforms lacked the “ajaxian coolness” of VTiger. It was time to back’er into the shop, pop the hood and get to work.

Webforms has been modified to be more flexible, stylish and robust – listed below are changes made to bring VTiger webforms closer to the UI standard of VTiger version 5.0.

See demo at http://mochabomb.com/Demo/cms/index.php?option=com_vtwebform&module=Lead

Download: Joomla vtiger webforms component zipfile    Standalone webform Lead zipfile

  • The table layout has been replaced with css
  • CSS with many classes for plenty of flexibility
  • Any field can be validated using the PHP Validator class
  • Forms retain all values when reloaded, including drop-downs
  • PHP Server-side validation responds with error messages adjacent to the field in error
  • Error messages use the “fade anything technique” for more stylish feedback
  • All fields are filtered of meta-characters to ensure more security against code injection attacks
  • Email domains are verified to be real (see Windows note below)
  • Email notification of new lead sent with lead information (from forum post here)
  • Distinct email format for the email lead notification and for the site visitor
  • HTML added to the existing “thank you” message to show

One version has the new version of the Lead and the other is a standalone webform Lead.
Documentation is online here and included with each zipfile; called VTiger-webforms-Lead.html

Issues:

  1. The standalone confirmation message is a page all by itself – what code is needed to keep it within the index.php page?
  2. No javascript validation – all done at the server – could save some time – at least there are no pop-ups..
  3. First and last name can be blank and it submits – need to fix this.
  4. email validation does not work with windows boxes.

vtiger – custom webforms with drop down and custom fields

February 7th, 2007

1. create a custom field, say “Loan Purpose” in the Leads module. In my forms, I’ll call this “loanpurpose”
2. Using phpmyadmin, browse to the Table: vtiger_leadscf
3. Look at the custom field name for the field in question – mine was called cf_453 This is the field name to be used in webforms.php
4. The name cf_453 only needs to be used in webforms.php, for the other files, call it something friendly – here I used loanpurpose.
5. assign like this:

index.php: add the field name loanpurpose to the line starting with: function create_lead_from_webform
In my implementation, used a drop down list in the form like this:



Loan Purpose:





send_data.php: add the line(s) for the new field

'loanpurpose'=>"$loanpurpose"

webforms.php: Add in both places:

if($_REQUEST['create'] == 'lead') function:
     $loanpurpose = $_POST['loanpurpose'];

and at

$params = array(
     $focus->column_fields['cf_453'] = $loanpurpose; *<-- this is where the new form value gets mapped to the custom field ID.*

Any errors encountered will be from typo's, missing "." or "," after the new field entries, wrong field names or a missing addition - look for where the other fields are passed and that is the best start for troubleshooting.

vTiger install notes

November 29th, 2006

1. Run the report field patch, located here to allow totals in reports:

http://mochabomb.com/software/Servers,PHP,Web/vTigerCRM/patches-vTiger/ReportFieldPatch

2. Fix the decimal places with this: http://forums.vtiger.com/viewtopic.php?t=10349
If you have an existing database, you will want to update the table structure manually. Table: vtiger_pricebookproductrel, Column: listprice, Format: N 11.2.

3. fix php.ini as noted in this post, here is the forum on it – a sample working file is attached.

http://forums.vtiger.com/viewtopic.php?t=10444&highlight=views

4. Invoices can be fixed here:

modules/Invoice/pdf_templates – for the header and footer, CreatePDF.php has the file calls for body.php, header.php and footer.php. The body is located in include/fpdf/ and this file is the body for all pages and must be modified – attached is the updated body.php
When editing the body.php, the font sizes are called as such and the line command has the abcissa and ordinate set, and the spaces determine the position of the number in the invoice boxes.

5. Company information that is on the invoices and terms/conditions are in settings. The logo is alow uploaded for application to the invoices.

6. Themes are edited in themes, the login image files are in themes/images and the login.php is in modules/Users/Login.php – this file has the contents of the login window. The login file is attached.
7. config.inc.php has the list entry default of 20, I updated to 50. It also sets the default theme

8. invoice auto-numbering – yet to be implemented, here is the file and fix for it.

9. Custom reports – files are attached.

vTiger php.ini settings

November 15th, 2006

vtiger php.ini file settings

Option | Setting
===============
Safe Mode | Off
Display Errors | On
File Uploads | On
Register Globals | Off

Max Execution Time – 300

output_buffering – On

Change the memory limit – 16M

error_reporting – E_WARNING & ~E_NOTICE

allow_call_time_reference – On

output_buffering – On

log_error = off

GD Library support

extension=php_gd2.dll (remove the comments)

IMAP Support
extension=php_imap.dll (remove the comments)

For custom views to work, need to set in php.ini:

register_long_arrays – MUST be set to On. It is set to Off by default.