vTiger 6 came out with a very useful and easy to use tool to create custom modules. Unfortunately, the tool is not part of the user interface, however with a very little knowledge of unix and ability to navigate using SSH connection – you will be able to create a vTiger custom module within few seconds.
Firs thing you need to do is find out how to connect to your server via SSH. For those how are using shared hosting, it is not always an option, so you should check with your hosting provider if this option is available. Assuming you have access and know how to connect, go ahead connect to the server and navigate to your vTiger directory.
The tool is located at /yourvtigercrm6/vtlib/tools/ folder, go ahead and navigate to that folder, assuming you are in your vTiger6 folder, you would just do
There is a file called “Console.php” in tools folder, to execute it do:
And you will be presented with options to
We are create a vTiger custom module, so go ahead and type in ‘1‘ and hit enter.
You will receive the confirmation from the system that you are creating “>>> Module <<<” and will be asked to enter vTiger Module Name. Enter the module name and hit enter.
We are going to create “Crates” module, so we will use that as module name.
Next, you will have to enter the vTiger field name such as “Crate Name”, hit enter and the module will be created and automatically installed.
Login to your vTiger and you will see the module already installed. Use the layout editor to add custom fields and configure the module.
Hope that helps!
37 Comments
Congratulations on your post.
How can we relate a tab in the new module?
We don’t have an article on that yet, but stay tuned – we should have something shortly. Thanks
i tried this and getting error message…
“PHP Notice: Use of Undefined constant E_DEPRECATED – assumed ‘E_DEPRECATED’ in lampp/htdocs/crm/config.inc.php on line 17”
What could be the cause ???
Try to disable those notices by adding this to your index.php file:
error_reporting(E_ALL & ~E_DEPRECATED);
how do we create a custom module in vtiger 6.0 could u please give me a basic sample file or something like that ??
How it works in local server with windows and xampp ?
Thoufeeq – The article explains how to create a module – you should be able to do that following the instructions.
Sino – It works the same way, you go into command line and do the same command. Note, you might need to specify php.exe file when running the console.php.
Hi.. trying on cmd but it shows error
php is not a recognized as an internal or external command, operable program or batch file.
When I put the command:
php -f console.php
Appears this message “Usage: php -f vlib/tolos/creator.php”
and nothing happen
Is this an error?? and what is the solve?
instead of “php -f console.php” do “php -f creator.php”.
Can you relate the new module to an existing module?
Yes, however that has to be done in the code/database. If you need help with – let us know.
Yes I need help, can you explain me please?
Hi,
I also need help on this very urgently.
Please help.
Unfortunately we do not have a procedure for this yet, but we could definitely help you out on the individual cases – please contact us via support@vtigerexperts.com – Thanks!
When i’m trying to create a new custom module following this
tutorial i’m getting the following errors / warnings
Welcome to Vtiger CRM Creator.
This tool will enable you to get started with developing extensions with ease.
Have a good time. Press CTRL+C to “quit”.
Choose the options below:
1. Create New Module.
2. Create New Layout.
3. Create New Language Pack.
4. Create Test Language Pack.
Enter your choice: 1
>>> MODULE <<<
Enter module name: Privati
Entity field (Name): Clienti Privati
Creating …PHP Warning: in_array() expects parameter 2 to be array, null given in /Applications/MAMP/htdocs/vtigerCRM/vtlib/Vtiger/Utils.php on line 210
PHP Warning: in_array() expects parameter 2 to be array, null given in /Applications/MAMP/htdocs/vtigerCRM/vtlib/Vtiger/Utils.php on line 210
PHP Warning: mysql_real_escape_string(): No such file or directory in /Applications/MAMP/htdocs/vtigerCRM/include/database/PearDatabase.php on line 1004
PHP Warning: mysql_real_escape_string(): A link to the server could not be established in /Applications/MAMP/htdocs/vtigerCRM/include/database/PearDatabase.php on line 1004
PHP Warning: mysql_insert_id() expects parameter 1 to be resource, boolean given in /Applications/MAMP/htdocs/vtigerCRM/libraries/adodb/drivers/adodb-mysql.inc.php on line 218
PHP Warning: mysql_insert_id() expects parameter 1 to be resource, boolean given in /Applications/MAMP/htdocs/vtigerCRM/libraries/adodb/drivers/adodb-mysql.inc.php on line 218
PHP Warning: in_array() expects parameter 2 to be array, null given in /Applications/MAMP/htdocs/vtigerCRM/vtlib/Vtiger/Utils.php on line 210
PHP Warning: mysql_insert_id() expects parameter 1 to be resource, boolean given in /Applications/MAMP/htdocs/vtigerCRM/libraries/adodb/drivers/adodb-mysql.inc.php on line 218
PHP Warning: in_array() expects parameter 2 to be array, null given in /Applications/MAMP/htdocs/vtigerCRM/vtlib/Vtiger/Utils.php on line 210
PHP Warning: mysql_insert_id() expects parameter 1 to be resource, boolean given in /Applications/MAMP/htdocs/vtigerCRM/libraries/adodb/drivers/adodb-mysql.inc.php on line 218
PHP Warning: mysql_insert_id() expects parameter 1 to be resource, boolean given in /Applications/MAMP/htdocs/vtigerCRM/libraries/adodb/drivers/adodb-mysql.inc.php on line 218
PHP Warning: mysql_insert_id() expects parameter 1 to be resource, boolean given in /Applications/MAMP/htdocs/vtigerCRM/libraries/adodb/drivers/adodb-mysql.inc.php on line 218
PHP Warning: mysql_insert_id() expects parameter 1 to be resource, boolean given in /Applications/MAMP/htdocs/vtigerCRM/libraries/adodb/drivers/adodb-mysql.inc.php on line 218
PHP Warning: mysql_insert_id() expects parameter 1 to be resource, boolean given in /Applications/MAMP/htdocs/vtigerCRM/libraries/adodb/drivers/adodb-mysql.inc.php on line 218
PHP Warning: mysql_insert_id() expects parameter 1 to be resource, boolean given in /Applications/MAMP/htdocs/vtigerCRM/libraries/adodb/drivers/adodb-mysql.inc.php on line 218
PHP Warning: mkdir(): File exists in /Applications/MAMP/htdocs/vtigerCRM/vtlib/tools/Console.php on line 258
DONE.
And no module was created.
Gabriele – disable php warnings in php.ini and try again
Disabled php_erros nothing has changed
Well i tried your console method of creating a custom module ,it was something pass and yet a fail why?
Here is the reason :
if we create a module through a console ,it is created successfully , but you did not notice error when we try to create a module through console, the user form saving stopped i mean you are no more able to create new users in admin settings panel .
CAN you please have a look into this error , you can try this surely there will be an error.
thanks
Hi, accessed the right directory in DOS, then got erro message
“PHP is not a valid command.” therefore nothin happens.
for your reference we use easyphp to run php and apache.
Can you give me better directions? Thanks
p.s. Vtiger6.0 is working perfectly, BTW
If you are using Windows and do not have shell path setup, you will then need to provide full path to php.exe, for example it would be something like:
C:\Program Files\vtigercrm\apache\php\bin\php.exe -f Console.php
That helps.
I came to the same conclusion and run php.exe from the directory where it stands, parameterizing console.php with its full path, and go an erro saying a .dll file is missed. think it has nothing to do with the console.php rather depends on the php installatino, will try to fix it.
thanks, if you have any additional suggestion, feel free to tell me.
problem fixed, was an issue with the directory where to lookk for the .dll file.
Thanks for sharing
still unable to run the console file, PHP.EXE reports this error message :
Unable to open input file (with the whole console.php path)
Close to the goal, perhaps, but still not scoring
fixed it, bit troublesome but we finallyy did, needed to find the right directory where to point the console .php commands
Thanks for your tutorial
but I have a problem after lake the module I got this error
Permission to perform the operation is denied for name
I use vtiger 6.1
I hope you can help me in this
What is the module name that you are using?
Hello VTE,
Thank you for your guider.
Following your guide, I did some command, then I have created successfully a new Language pack for English_Vietnam. The new language pack already in folder /vtiger/language/my_new_language_pack
But when I login into my Vtiger, then go to preference, I can not see where is my new language pack in the optionals of language.
Could you please give me an advise? I’m using Vtiger 6.1.
Best and Regards,
DUC
Hello there,
I have created 4 modules from your given steps on my localhost. But as I move it to on my server the “Add Records” option is not showing on modules and on edit it is showing permission denied. can you plz help on this to me.
Thanks
hi
I tried this method , but i got an error after running php -f Console.php , error is Could not open input file. Please help me.
hi do you have the article on how to ralates with custom module. please help me on this.
really Great thing to create the module,
but when we want to create the module via program or code.how we can do it??
Just use our extension that allows to create custom modules:
https://www.vtexperts.com/extension/vtiger-custom-module-and-relationship-builder/
This method not working in vtigercrm-7. After following given steps module created but listing and editing of module not work perfectly. There is any other option available for create new module??
Use our extension for that: https://www.vtexperts.com/product/vtiger-custom-module-and-relationship-builder/
I have the problem that the process interrupts just after i enter the module name.
It just goes back to the directory path without any error message.
I am using the Open Source (maybe this is the issue) version of Vtiger 6.5 i already tried with sudo.
I am working on a Synology NAS please help!!!