Original post from bk_developer does not state anything about how he saves his data..
Is he using a entity repository with Doctrine or just plain hacking into the database, who knows !?
But here's my take to tackle this :
To add a field to product, you'll need to register actionAdminProductsControllerSaveAfter
in your module code :
public function hookActionAdminProductsControllerSaveAfter(&$params)
{
if (!isset($_REQUEST['form']['id_product']))
return;
// let's assume that your formbuilder is custom_product when POST is done..
$formData = $_REQUEST['custom_product_fields']; // this is where your custom posted data are.
$formData['product_id'] = $_REQUEST['form']['id_product']; // this might get handy while saving.
//*** Insert your custom save logic here
// Note : either if you modded the DB or having relation entity fields, you can use whatever technique suits you best.
}
To add precision on my previous post,
As for v1.7.8.6, i'm not aware that the magic hook ActionProductFormBuilderModifier exists.
From what i've found, hooks to display in form are :
displayAdminProductsExtra,
displayAdminProductsMainStepLeftColumnMiddle,
displayAdminProductsMainStepLeftColumnBottom,
displayAdminProductsMainStepRightColumnBottom,
displayAdminProductsQuantitiesStepBottom,
displayAdminProductsPriceStepBottom,
displayAdminProductsOptionsStepTop,
displayAdminProductsOptionsStepBottom,
displayAdminProductsSeoStepBottom