You are here

function uc_product_class_delete_confirm in Ubercart 5

Same name and namespace in other branches
  1. 6.2 uc_product/uc_product.admin.inc \uc_product_class_delete_confirm()
  2. 7.3 uc_product/uc_product.admin.inc \uc_product_class_delete_confirm()

Confirm the deletion of a product class.

See also

uc_product_class_delete_confirm_submit

1 string reference to 'uc_product_class_delete_confirm'
uc_product_menu in uc_product/uc_product.module
Implementation of hook_menu().

File

uc_product/uc_product.module, line 2230
The product module for Ubercart.

Code

function uc_product_class_delete_confirm($class_id) {
  $result = db_query("SELECT COUNT(*) AS number FROM {node} WHERE type = '%s'", $class_id);
  $products = db_fetch_object($result);
  $form['pcid'] = array(
    '#type' => 'value',
    '#value' => $class_id,
  );
  $form['#redirect'] = 'admin/store/products/classes';
  $output = confirm_form($form, t('Be very sure you want to delete the %type product class. It will become a standard node type.', array(
    '%type' => $class_id,
  )), 'admin/store/products/classes', format_plural($products->number, 'There is @count node of this type.', 'There are @count nodes of this type.'), t('Continue'), t('Cancel'));
  return $output;
}