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.

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

Comments

Status:Active» Needs review
StatusFileSize
new790 bytes
PASSED: [[SimpleTest]]: [MySQL] 3,587 pass(es).
[ View ]

Title:sample code for hook_commerce_product_type_info() isn't a good exampleProvide 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.