Jump to content

How To Alter Table Universal Module ?


AllToolKits.com

Recommended Posts

Hi,
I need to add an extra field in Module Options of Universal Module in Blesta.(below the Name field).
But it doesn't save the value when add a new field in add_row.php file (view part).
 
How to add a new field in Module Options of Universal Module for Blesta.
 
 
I can't see how it's creating table for it, there is no install function. usually i had seen code like this to create a table.
 
 $this->Record->
                         setField("set_id", array('type' => "int", 'size' => 10, 'unsigned' => true, 'auto_increment' => true))->
                         setField("set_key", array('type' => "varchar", 'size' => 256))->
                         setField("set_value", array('type' => "varchar", 'size' => 256))->
                         setField("set_status", array('type' => "int", 'size' => 1))->
                         setKey(array("set_id"), "primary")->
                         create("synergy_settings", true);

But there is no such code in Universal Module, how it's creating a table?

Link to comment
Share on other sites

Modules don't typically create tables. A plugin would be better suited for that.

 

The Universal Module makes use of the existing schema to add products as module rows. If you're trying to mimic its behavior, you should check out how the Universal Module formats package and service fields from a product into module row meta data.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...