Additional fields for Ubercart uc_order_product I need to add fields to the Ubercart entity uc_order_product. I was looking into the function field_create_instance, but don`t know exactly where to use it. I believe I should attach the field I want to the uc_order_product entity using field_create_instance.

The 'uc_order_product' definition in uc_order.module doesn't have a fieldable => TRUE definition. May I add that definition from my custom module and tell uc_order_product is fieldable? This is uc_order_product entity definition in the uc_order.module.

'uc_order_product' =&gt; array(
  'label' =&gt; t('Order product'),
  'base table' =&gt; 'uc_order_products',
  'controller class' =&gt; 'UcOrderProductController',
  'metadata controller class' =&gt; 'UcOrderProductMetadataController',
  'entity keys' =&gt; array(
    'id' =&gt; 'order_product_id',
    'label' =&gt; t('Order product'),
  ),
  'bundles' =&gt; array(
    'uc_order_product' =&gt; array(
      'label' =&gt; t('Order product'),
    ),
  ),
  'view modes' =&gt; array(
    'full' =&gt; array(
      'label' =&gt; t('Normal view'),
    ),
    'cart' =&gt; array(
      'label' =&gt; t('Cart view'),
    ),
  ),
  // Entity API callbacks.
  'access callback'   =&gt; 'uc_order_order_product_access',
  'save callback'     =&gt; 'uc_order_product_entity_save',
  'deletion callback' =&gt; 'uc_order_product_delete',
) 


Finally, I am trying to hook to this entity when it gets updated (hook_entity_update, hook_entity_presave) but they never get called on uc_order_product update. How can I hook to this entity when it is being saved, or when it has been saved? Thank you!
First of all, if you want alter the meta information of an entity, the hook_entity_info_alter in your custom module is the right way. More information in official page: hook_entity_info_alter

In this particular case, attributte 'fieldable' is not defined, so the function responsable to call the hook_entity_info and hook_entity_info_alter is the entity_get_info() in common.inc file. This function provide default values and the default value to 'fieldable' is FALSE. You only need change this value implementing hook_entity_info_alter.

 function YOUR_MODULE_entity_info_alter(&amp;$entity_info){
   if(isset($entity_info['uc_order_product'])){
     $entity_info['uc_order_product']['fieldable'] = TRUE;
   }
 }


Second issue, This is a link to a previous question about how create fields programatically. The best answer suggests field_create_fieldand 'field_create_instance', but if you have a defined field (for example, an image type field created through the UI), you could use field_update_field and 'field_update_instance'. You can find more information about these functions in field.crud.inc in the field module folder.