You are here

function uc_product_kit_store_status in Ubercart 5

Same name and namespace in other branches
  1. 6.2 uc_product_kit/uc_product_kit.module \uc_product_kit_store_status()

File

uc_product_kit/uc_product_kit.module, line 620
The product kit module for Übercart.

Code

function uc_product_kit_store_status() {
  if (module_exists('imagefield')) {
    $result = db_query("SELECT field_name FROM {node_field_instance} WHERE field_name = 'field_image_cache' AND widget_type = 'image' AND type_name = 'product_kit'");
    if (!db_num_rows($result)) {
      return array(
        array(
          'status' => 'ok',
          'title' => t('Images'),
          'desc' => t('Product kits do not have an image field. You may add the existing <em>field_image_cache</em> at the <a href="!url">Add field page</a>.', array(
            '!url' => url('admin/content/types/product-kit/add_field'),
          )),
        ),
      );
    }
  }
}