You are here

class UcOrder in Ubercart 7.3

Same name and namespace in other branches
  1. 6.2 uc_order/uc_order.module \UcOrder

Defines an order object.

Hierarchy

Expanded class hierarchy of UcOrder

File

uc_order/uc_order.module, line 19

View source
class UcOrder {
  public $order_id = 0;
  public $uid = 0;
  public $order_status = '';
  public $order_total = 0;
  public $primary_email = '';
  public $delivery_first_name = '';
  public $delivery_last_name = '';
  public $delivery_phone = '';
  public $delivery_company = '';
  public $delivery_street1 = '';
  public $delivery_street2 = '';
  public $delivery_city = '';
  public $delivery_zone = 0;
  public $delivery_postal_code = '';
  public $delivery_country = 0;
  public $billing_first_name = '';
  public $billing_last_name = '';
  public $billing_phone = '';
  public $billing_company = '';
  public $billing_street1 = '';
  public $billing_street2 = '';
  public $billing_city = '';
  public $billing_zone = 0;
  public $billing_postal_code = '';
  public $billing_country = 0;
  public $products = array();
  public $line_items = array();
  public $payment_method = '';
  public $data = array();
  public $created = 0;
  public $modified = 0;
  public $currency = '';

  /**
   * Order object constructor.
   *
   * @param $uid
   *   The user ID that owns the order, or a cart ID. Cart IDs are integer
   *   user IDs for authenticated users, or are strings of 22 characters
   *   or more for anonymous users.
   * @param $state
   *   The initial order state.
   */
  public function __construct($uid = 0, $state = 'in_checkout') {
    if (strlen($uid) < 22 && $uid > 0) {
      $this->uid = $uid;
      if ($account = user_load($uid)) {
        $this->primary_email = $account->mail;
      }
    }
    $this->order_status = uc_order_state_default($state);
    $this->currency = variable_get('uc_currency_code', 'USD');
    $this->billing_country = variable_get('uc_store_country', 840);
    $this->delivery_country = variable_get('uc_store_country', 840);
    $this->created = REQUEST_TIME;
    $this->modified = REQUEST_TIME;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
UcOrder::$billing_city public property
UcOrder::$billing_company public property
UcOrder::$billing_country public property
UcOrder::$billing_first_name public property
UcOrder::$billing_last_name public property
UcOrder::$billing_phone public property
UcOrder::$billing_postal_code public property
UcOrder::$billing_street1 public property
UcOrder::$billing_street2 public property
UcOrder::$billing_zone public property
UcOrder::$created public property
UcOrder::$currency public property
UcOrder::$data public property
UcOrder::$delivery_city public property
UcOrder::$delivery_company public property
UcOrder::$delivery_country public property
UcOrder::$delivery_first_name public property
UcOrder::$delivery_last_name public property
UcOrder::$delivery_phone public property
UcOrder::$delivery_postal_code public property
UcOrder::$delivery_street1 public property
UcOrder::$delivery_street2 public property
UcOrder::$delivery_zone public property
UcOrder::$line_items public property
UcOrder::$modified public property
UcOrder::$order_id public property
UcOrder::$order_status public property
UcOrder::$order_total public property
UcOrder::$payment_method public property
UcOrder::$primary_email public property
UcOrder::$products public property
UcOrder::$uid public property
UcOrder::__construct public function Order object constructor.