Jump to content

Recommended Posts

Posted

Hello!

Is there any way to customize/add onto core features directly from plugins without having to actually edit the core files?

I need to add additional functionality to the invoicecreate form, but would if possible keep everything about the plugin in the plugin code and not splash it around in the core.

 

How do you guys resolve this issue?

Swapping out core files with modified ones on plugin install?

 

Thanks!

/Wandros

Posted
  On 4/7/2017 at 4:25 AM, wandros said:

I need to add additional functionality to the invoicecreate form, but would if possible keep everything about the plugin in the plugin code and not splash it around in the core.

Expand  

Modifying the invoice creation form would be part of the core. However, you could create a plugin that adds an action to the Actions section on a client profile page, when clicked, would load the plugin with your own invoice creation form. You'd have full control over it. The core form would still exist, but you could use the one you created instead. This is a good place to start - https://docs.blesta.com/display/dev/Creating+a+Plugin

Posted

Thanks for the responses!

Instead of modifying the existing invoice creation page, I'm going to do as follows.

Create my own invoice creation page, based on the original one but residing inside my plugin.

Then hijack all the requests to the original invoicecreate form using preAction event in plugin with url filtering to redirect to my plugins own invoicecreate page.

 

Any disadvantage to this approach?

 

Thanks!

/Wandros 

 

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...