If I declare a product as so:

function rooms_booking_commerce_product_type_info() {
   return array(
    array(
      'type' => 'booking1',
      'name' => t('Booking1'),
      'description' => 'A booking sale',
      'help' => '',
    ),
  );
}

when I update the Product Types page (and clear the cache) I see the type with no links (see first image).

If I go into another type, save and exit the fields come up.

If I go in to manage fields I get:

Notice: Undefined index: admin in _field_ui_bundle_admin_path() (line 310 of ../modules/field_ui/field_ui.module).

Also in the URL:

admin/commerce/products/types/0/fields

i.e. 0 rather than bundle name.

Haven't investigated further but will be doing so. In the meantime it seems the only reliable way to create a product type is via commerce_product_ui_product_type_new

Comments

fredericXavier’s picture

Category: bug » support
Status: Active » Needs review

Hi ronald_istos,

Firstly, for see the link, you must clear the cache two times (problem with a cache)
And Secondly, attention at the declaration of you product, he missing the key, the correct syntax is:

function rooms_booking_commerce_product_type_info() {
  return array(
    'book' => array(
      'type' => 'booking1',
      'name' => t('booking1'),
      'description' => 'A booking sale',
      'help' => '',
    )
  );
}

If you try this, it should work!

mr.baileys’s picture

Version: 7.x-1.0-beta4 » 7.x-1.x-dev
Status: Needs review » Active

There is no patch for review here, setting back to active.

mr.baileys’s picture

Status: Active » Closed (cannot reproduce)

I'm no longer able to reproduce this with 7.x-1.x-dev. Product types added using hook_commerce_product_type_info() show up with the "manage fields" and "manage display" immediately, without the need to clear the cache.

Please re-open if you are still encountering problems.