<?php
uc_product_node_info($reset = FALSE)
?>Description:
The implementation of hook_node_info() for products dynamically retrieves node information from the table uc_product_classes and hook_product_info(). They keys from the returned array can be used as a list of all valid product node types.
Parameters:
- $reset - if TRUE, causes the node types array to be rebuilt from the database
Return value:
An array whose keys are the machine-readable node types, and whose values are arrays containing the node type's information. See hook_node_info() for details.
Example:
<?php
if (in_array($node->type, array_keys(uc_product_node_info()))){
// $node is a product, so it has product information like $node->model, $node->sell_price, etc.
}
?>See also:
