Re: product classes: using the 'product_types' hook

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6841
Re: product classes: using the 'product_types' hook

This is a good thing to look into, but I want to advise caution because there are good reasons to use each method. hook_product_types() is used to find all the node types that can be used in Ubercart's API. They will have a price and weight, and all that fun stuff.

However, if the code is dealing with the idea that these nodes use the same callbacks to generate information, then you should stick to querying the {uc_product_classes} table. These types use the same node hooks, and they will have the same add to cart forms. They are even more similar too each other than node types that aren't created by uc_product. Like product kits.

product classes: using the 'product_types' hook By: New Zeal (2 replies) Wed, 07/09/2008 - 19:01