We would like to export a field added to a table from another module.
What is the field ID?: my_field (has to correspond exactly to the field name in Product Class)
if ( in_array( $switchObject,array('my_field') ) )
$field = 0;
$sql = "SELECT my_field FROM "._DB_PREFIX_."my_table WHERE id_product=".(int)$p->id;
$res = Db::getInstance()->ExecuteS($sql);
if ( count( $res ) )
$field = (int)$res['my_field'];
You will need to adapt this code to your needs.