Jump to content


Photo

Steps to duplicate a module?

module duplicate similar functionality

  • Please log in to reply
7 replies to this topic

#1 mledwards

mledwards

    Advanced Member

  • Members
  • PipPipPip
  • 85 posts

Posted 01 November 2012 - 11:03 AM

Hi all!

I've started using Zurmo for our company CRM and out of the box it covers almost everything we need, which is great! I'm feeling my way around the code, but I was wondering what the steps would be to simply duplicate a module and re-use it in exactly the same places with a different name?

I would like to duplicate the Tasks module and make it a Revenue module. I think I can do the rest from there :-D

I guess this raises another question, it seems a missing feature that "Opportunities" have an "Amount" field, but not a way of breaking this up chronologically (say, month by month).

I hope you guys can help!

Martin

#2 raysto

raysto

    Zurmo Team

  • Administrators
  • 1,973 posts

Posted 01 November 2012 - 09:34 PM

Hi Martin,
Happy to hear that you have started using Zurmo internally. You will have to keep us updated on how things progress. There is no "quick-button" to duplicate a module. You can copy a module and change it. Perhaps in the future, we can create an easier way of replicating existing modules. These links might help when doing any type of customizations:
http://zurmo.org/wik...stomizing-zurmo
http://zurmo.org/wik...invoice-example

For Opportunities, we do not have any kind of feature to spread an opportunity across multiple months. Are you referring to this type of Opportunity that is recurring (every month) or gets split up over several months? We may build a subscription-like feature so that you can easily capture multi-interval Opportunities.

Ray Stoeckicht
Zurmo Team
Try Zurmo Pro


#3 mledwards

mledwards

    Advanced Member

  • Members
  • PipPipPip
  • 85 posts

Posted 02 November 2012 - 10:05 AM

Hi Ray,

Thanks for the reply! We've imported some data and it's all going nicely.

I've run through the animals tutorial and got it working, so hopefully I can customise my duplicated module around this! I guess the main part I'm not too confident about is how to make a module appear inside other modules. Ideally I want the new module (which I'll duplicate from "Tasks") to appear for each "Opportunity".

Where our model differs slightly is we're continuing to use "Opportunities" once they're set to "Closed won". As if the project has then begun and we want to continue tracking tasks and revenue.

Thank you for the help, it's comforting to have contact with the team.

Martin

#4 raysto

raysto

    Zurmo Team

  • Administrators
  • 1,973 posts

Posted 02 November 2012 - 06:31 PM

Thanks for clarifying things further. Once you get more familiar with customizing Zurmo further, I'm sure you will have more questions. You might want to attend a dev session and ask our lead engineer and other developers how they would approach the customization. We have dev sessions every Tuesday at 10AM Chicago Time (http://zurmo.org/for....php?/calendar/). We would be happy to answer any questions or offer insight on how to do it best.

Ray Stoeckicht
Zurmo Team
Try Zurmo Pro


#5 mledwards

mledwards

    Advanced Member

  • Members
  • PipPipPip
  • 85 posts

Posted 05 November 2012 - 02:30 PM

Perfect!

I'm in the UK, I'll login at 4pm!

Any pointers on adding my new module to existing views?

#6 Ivica

Ivica

    Advanced Member

  • Moderators
  • 565 posts

Posted 05 November 2012 - 04:09 PM

You need to add your module in list of application modules in config/common.php, or even better in perInstance.php file:
$instanceConfig['modules'][] = 'YOUR_MODUE_NAME'


Next you need to define module menu metadata, you can get more details from this article:
http://zurmo.org/wik...global-metadata

Let us know if this helps or not.

#7 mledwards

mledwards

    Advanced Member

  • Members
  • PipPipPip
  • 85 posts

Posted 05 November 2012 - 05:56 PM

Hi there,

My module is building to the database and is appearing correctly in the Designer view for me to customise. I've got the module added to the perInstanceConfig.php so everything is set.

Now I'd like the module to appear for each "Opportunity". It seems like a lot of the information I can find just helps with getting it onto menus, but not into other module's views.

From what I can gather I need to add my module to the "OpportunityDetailsAndRelationsView" metadata in the "rightTopView".

Any help would be greatly appreciated,

Martin

#8 mledwards

mledwards

    Advanced Member

  • Members
  • PipPipPip
  • 85 posts

Posted 05 November 2012 - 06:07 PM

As a quick test I tried running the line below (once) to my RevenuesInstallUtil function in the extension, which added what I thought was needed to the metadata table, but it still isn't showing.

$metadata['global']['rightTopView']['columns'][0]['rows'][]["type"] = "OpenRevenuesForOpportunityRelatedList";





Also tagged with one or more of these keywords: module, duplicate, similar functionality

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users