Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Creating a new module: basic steps?
#5
(11-28-2015, 03:55 PM)joebordes Wrote: You can create a normal module with the fields you need and have the user configure the access as a new record, just like any other module. You could even add a preSaveCheck to avoid creating more than one record. That is the easy way.

a PreSaveCheck on creation of each record? Or a presave check on creation of the module?

(11-28-2015, 03:55 PM)joebordes Wrote: If you want to do it in Settings (which is a little more in line with the application) you have to create your own Settings.php file in your module. Simply adding this file to your module will give it access to layout editor and workflows, if you modify it you can add your own entries and your own templates. The problem with this is that you have to manually do all the work, you have to create the table, setup the form, recover and edit all the data.
I've done this, but haven't spent enough time researching it yet. I would like to do it this way to have a neater result.. I'll take a look at the payment module but I have a lot of methods for the database stuff (the settings piece, with the OAuth parameters and other Exact Online specific settings) already written so I think I'll take this approach.


(11-28-2015, 03:55 PM)joebordes Wrote: All templates for a new module go inside it's own template directory. For example for Payment module which is called CobroPago, you will have Smarty/templates/modules/CobroPago. When you create your module you create a "templates" directory and they will copied to the correct place during installation.

You mean templates inside Smarty folder right?

Anyway I'm also thinking about using some record saving in the module, but I'll explain this in the thread about the actual module.
Reply


Messages In This Thread
RE: Creating a new module: basic steps? - by Guido1982 - 11-30-2015, 09:42 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)