1
Answers
Vote up!
0
Vote down!

How do I create a product type programatically?

I'm trying to create a product type that has some extra fields programatically in a module. I've searched google, and the closest I've come to solving this is a hook that doesn't exist anymore in the code base, hook_commerce_product_info(). Aside from using commerce features module, is there anyway I can programatically create a product type in a module?

Asked by: disasm
on October 2, 2012

1 Answer

Vote up!
0
Vote down!

Answering my own question. After digging through drupal issue queues and a lot of grep'ing the code, I found hook_commerce_product_type_info() is the new hook I need to implement.

Answer by: disasm
Posted: Oct 2, 2012

Comments

I am able to use hook_commerce_product_type_info() to create different product variation types, what hook did you use to create the corresponding product display type? I can't seem to find that in the api.

Thanks!
-Tom

- jonaskills on January 8, 2014