You are here

function uc_fedex_uc_store_status in FedEx Shipping 7.2

Implements Ubercart's hook_uc_store_status().

Lets the administrator know if the FedEx account information has not been filled out.

Return value

array Array of error or status messages from configuration of FedEx module.

File

./uc_fedex.module, line 214
FedEx Web Services Rate / Available Services Quote.

Code

function uc_fedex_uc_store_status() {
  $messages = array();
  $key = variable_get('uc_fedex_user_credential_key', 0);
  $password = variable_get('uc_fedex_user_credential_password', 0);
  $account = variable_get('uc_fedex_account_number', 0);
  $meter = variable_get('uc_fedex_meter_number', 0);
  if ($key && $password && $account && $meter) {
    $messages[] = array(
      'status' => 'ok',
      'title' => t('FedEx Ship Manager'),
      'desc' => t('Information needed to access FedEx Ship Manager has been entered.'),
    );
  }
  else {
    $messages[] = array(
      'status' => 'error',
      'title' => t('FedEx Ship Manager'),
      'desc' => t('More information is needed to access FedEx Ship Manager. Please enter it !link.', array(
        '!link' => l('here', 'admin/store/settings/quotes/settings/fedex'),
      )),
    );
  }
  return $messages;
}