To create an own Dashlet PipelineBySalesStage proceed as follows:
1. Copy modules\Charts\Dashlets\MyPipelineBySalesStageDash let\* to custom\modules\Charts\Dashlets\AllPipelineBySalesS tageDashlet\*
2. Rename alle files in custom\modules\Charts\Dashlets\PipelineBySalesStag eDashlet\ from MyPipeline* to AllPipeline*
3. Open all 4 files and change alle words "MyPipeline*" to "AllPipeline*"
4. In file PipelineBySalesStageDashlet.php change all words "_my_pipeline_" to "_all_pipeline_" and all words "LBL_MY_PIPELINE_FORM_TITLE" to "LBL_ALL_PIPELINE_FORM_TITLE"
5. In file PipelineBySalesStageDashlet.php change line
return parent::displayOptions() . $ss->fetch('modules/Charts/Dashlets/AllPipelineBySalesStageDashlet/AllPipelineBySalesStageConfigure.tpl');
to
return parent::displayOptions() . $ss->fetch('custom/modules/Charts/Dashlets/AllPipelineBySalesStageDashlet/AllPipelineBySalesStageConfigure.tpl');
and line
$this->loadLanguage('AllPipelineBySalesStageDashlet', 'modules/Charts/Dashlets/');
to
$this->loadLanguage('AllPipelineBySalesStageDashlet', 'custom/modules/Charts/Dashlets/');
5. In file PipelineBySalesStageDashlet.php find this block
PHP Code:
if ($count>0) {
foreach ($new_ids as $the_id=>$the_name) {
$id[] = "'".$the_id."'";
}
$ids = join(",",$id);
$where .= "opportunities.assigned_user_id IN ($ids) ";
}
and comment it out or just delete it.
PHP Code:
/****** this should not be done:
if ($count>0) {
foreach ($new_ids as $the_id=>$the_name) {
$id[] = "'".$the_id."'";
}
$ids = join(",",$id);
$where .= "opportunities.assigned_user_id IN ($ids) ";
}
*****/
6. Create file custom/modules/Home/language/en_us.lang.php and write the following to this file:
PHP Code:
<?php
$mod_strings['LBL_ALL_PIPELINE_FORM_TITLE'] = 'Total Pipeline';
?>
7. Now save all files and call "admin" - "repair" - "Rebuild Dashlets"
8. Ready - just enyoi your new dashlet (I hope I did not mistype).
Good luck
hk
Bookmarks