function hook_commerce_product_type_info() {
  // Return the product types defined in the database by the Product UI module.
  return db_query('SELECT * FROM {commerce_product_type}')->fetchAllAssoc('type', PDO::FETCH_ASSOC);

No module is going to want to do that. This should show the actual array you should return.

#1 1801964.commerce.hook_commerce_product_type_info-sample.patch790 bytesjoachim
PASSED: [[SimpleTest]]: [MySQL] 3,587 pass(es). View


joachim’s picture

Status:Active» Needs review
790 bytes
PASSED: [[SimpleTest]]: [MySQL] 3,587 pass(es). View
rszrama’s picture

Title:sample code for hook_commerce_product_type_info() isn't a good example» Provide a better example for hook_commerce_product_type_info()
Category:bug» task
Status:Needs review» Fixed

Yeah, that example sucked. Committed.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.