You are here

function uc_dropdown_attributes_node_load in Dropdown Attributes 7

Same name and namespace in other branches
  1. 8 uc_dropdown_attributes.module \uc_dropdown_attributes_node_load()

Implements hook_node_load().

Ubercart fails to load attributes for product classes.

File

./uc_dropdown_attributes.module, line 1101
Show/hide attributes based on the values of other attributes.

Code

function uc_dropdown_attributes_node_load($nodes) {
  foreach ($nodes as $node) {
    if (uc_product_is_product($node)) {
      if (empty($node->attributes)) {
        $node->attributes = uc_class_get_attributes($node->type);
      }
    }
  }
}