This is generally not recommended as the _cstm table is exactly for this purpose. It ensures that your custom fields will live as the product is updated. However, if you really would like to do this set up a vardefs file with the new field(s) and define the vardef in the manifest file like:
PHP Code:
'vardefs' => array(
array('from'=> '<basepath>/vardefs/modules/MYMODULE/MYMODULE-vardefs.php',
'to_module'=> 'MYMODULE',
),
),
And in the MYMODULE-vardefs.php file:
PHP Code:
$dictionary['MYMODULE']['fields'] = array_merge ($dictionary['MYMODULE']['fields'],
array(
'MYFIELD'=>
array (
'name' => 'MYFIELD',
'vname' => 'LBL_MYFIELD',
'type' => 'char',
'len'=>155,
),
)
);
Or optionally add the necessary SQL statements to a pre_install script to create the field. The forums have more examples for both.
Bookmarks