You are here

function uc_order_condition_info in Ubercart 5

File

uc_order/uc_order_workflow.inc, line 38
This file contains the Workflow-ng hooks and functions necessary to make the order related entity, conditions, events, and actions work.

Code

function uc_order_condition_info() {
  $order_arg = array(
    '#entity' => 'order',
    '#label' => t('Order'),
  );
  $conditions['uc_order_condition_order_status'] = array(
    '#label' => t('Check the order status'),
    '#arguments' => array(
      'order' => $order_arg,
    ),
    '#module' => t('Order'),
  );
  $conditions['uc_order_condition_order_total'] = array(
    '#label' => t('Check the order total'),
    '#arguments' => array(
      'order' => $order_arg,
    ),
    '#module' => t('Order'),
  );
  $conditions['uc_order_condition_delivery_postal_code'] = array(
    '#label' => t("Check an order's shipping postal code"),
    '#arguments' => array(
      'order' => $order_arg,
    ),
    '#description' => t('Returns TRUE if the shipping postal code is in the specified area.'),
    '#module' => t('Order: Shipping address'),
  );
  $conditions['uc_order_condition_delivery_zone'] = array(
    '#label' => t("Check an order's shipping @zone", array(
      '@zone' => uc_get_field_name('zone'),
    )),
    '#arguments' => array(
      'order' => $order_arg,
    ),
    '#description' => t('Returns TRUE if the shipping @zone is in the specified list.', array(
      '@zone' => uc_get_field_name('zone'),
    )),
    '#module' => t('Order: Shipping address'),
  );
  $conditions['uc_order_condition_delivery_country'] = array(
    '#label' => t("Check an order's shipping country"),
    '#arguments' => array(
      'order' => $order_arg,
    ),
    '#description' => t('Returns TRUE if the shipping country is in the specified list.'),
    '#module' => t('Order: Shipping address'),
  );
  $conditions['uc_order_condition_billing_postal_code'] = array(
    '#label' => t("Check an order's billing postal code"),
    '#arguments' => array(
      'order' => $order_arg,
    ),
    '#description' => t('Returns TRUE if the billing postal code is in the specified area.'),
    '#module' => t('Order: Billing address'),
  );
  $conditions['uc_order_condition_billing_zone'] = array(
    '#label' => t("Check an order's billing @zone", array(
      '@zone' => uc_get_field_name('zone'),
    )),
    '#arguments' => array(
      'order' => $order_arg,
    ),
    '#description' => t('Returns TRUE if the billing @zone is in the specified list.', array(
      '@zone' => uc_get_field_name('zone'),
    )),
    '#module' => t('Order: Billing address'),
  );
  $conditions['uc_order_condition_billing_country'] = array(
    '#label' => t("Check an order's billing country"),
    '#arguments' => array(
      'order' => $order_arg,
    ),
    '#description' => t('Returns TRUE if the billing country is in the specified list.'),
    '#module' => t('Order: Billing address'),
  );
  $conditions['uc_order_condition_has_products'] = array(
    '#label' => t("Check an order's products"),
    '#arguments' => array(
      'order' => $order_arg,
    ),
    '#description' => t('Returns TRUE if the order has any, all, or only the products in the list.'),
    '#module' => t('Order: Product'),
  );
  $conditions['uc_order_condition_count_products'] = array(
    '#label' => t("Check an order's number of products"),
    '#arguments' => array(
      'order' => $order_arg,
    ),
    '#description' => t('Determines if the order has the specified number of products, possibly of a certain type.'),
    '#module' => t('Order: Product'),
  );
  $conditions['uc_order_condition_products_weight'] = array(
    '#label' => t("Check an order's total weight"),
    '#arguments' => array(
      'order' => $order_arg,
    ),
    '#description' => t('Determines if the order has the specified weight, possibly counting only a certain type of product.'),
    '#module' => t('Order: Product'),
  );
  $conditions['uc_order_condition_is_shippable'] = array(
    '#label' => t('Check if an order can be shipped'),
    '#arguments' => array(
      'order' => $order_arg,
    ),
    '#description' => t('Returns TRUE if the order has any shippable products.'),
    '#module' => t('Order'),
  );
  return $conditions;
}