I'm somewhat surprised that this isn't possible -- to the point where I'm wondering if I've missed this!

Anyway, if this isn't possible yet, it should be: set a product reference field instance to limit the products it can reference to different types.

This is for the use case where for product types A and B I also have node types A and B. It would save make it easier for the site admin to have fewer options in the autocomplete or select widget, as well as preventing mistakes.

Comments

bojanz’s picture

Issue summary: View changes
Status: Active » Closed (works as designed)
/**
 * Implements hook_field_info().
 */
function commerce_product_reference_field_info() {
  return array(
    'commerce_product_reference' => array(
      'label' => t('Product reference'),
      'description' => t('This field stores the ID of a related product as an integer value.'),
      'settings' => array('options_list_limit' => NULL),
      'instance_settings' => array('referenceable_types' => array(), 'field_injection' => TRUE),

It's definitely available nowadays, maybe it was back then too? Closing issue.