You are here

function uc_dropdown_attributes_node_load in Dropdown Attributes 8

Same name and namespace in other branches
  1. 7 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 1218
A module for uc_dropdown_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
          ->getType());
      }
    }
  }
}