Drupal : The Ubercart 2.x Order Object Variables List

Since the Ubercart documentation is not what you really call "existant"... This is the object containing the order attributes. So if you see the variable $order in example code, this is it:
stdClass Object(
  [order_id] => %%4%%
  [uid] => %%17%%
  [order_status] => %%completed%%
  [order_total] => %%20%%
  [product_count] => %%1%%
  [primary_email] => %%example@example.com%%
  [delivery_first_name] => 
  [delivery_last_name] => 
  [delivery_phone] => 
  [delivery_company] => 
  [delivery_street1] => 
  [delivery_street2] => 
  [delivery_city] => 
  [delivery_zone] => 0
  [delivery_postal_code] => 
  [delivery_country] => %%300%%
  [billing_first_name] => %%Foo%%
  [billing_last_name] => %%Bar%%
  [billing_phone] => %%123456789%%
  [billing_company] => %%Example Co.%%
  [billing_street1] => %%Avenue Street%%
  [billing_street2] => 
  [billing_city] => %%City%%
  [billing_zone] => %%CityCode%%
  [billing_postal_code] => %%CityPostalCode%%
  [billing_country] => %%300%%
  [payment_method] => %%check%%
  [data] => 
  [created] => %%1285682018%%
  [modified] => %%1285682081%%
  [host] => %%192.168.x.xxx%%
  [products] => Array(
    [0] => stdClass Object(
      [order_product_id] => %%4%%
      [order_id] => %%4%%
      [nid] => %%1%%
      [title] => %%ProductTitle%%
      [manufacturer] => %%Manufacturer%%
      [model] => %%ModelName%%
      [qty] => %%1%%
      [cost] => %%0.00000%%
      [price] => %%20.00000%%
      [weight] => %%0%%
      [data] => Array(
        [attributes] => Array()
        [shippable] => %%0%%
        [module] => %%uc_product%%
      )
      [order_uid] => %%17%%
    )
  )
  [quote] => Array(
    [method] => 
    [accessorials] => 
    [rate] => %%0.00000%%
    [quote_form] => 
  )
  [line_items] => Array(
    [0] => Array(
      [line_item_id] => %%subtotal%%
      [type] => %%subtotal%%
      [title] => %%Subtotal%%
      [amount] => %%20%%
      [weight] => %%0%%
      [data] => 
    )
  )
)
PS: The values between '%%' mean example values so that you can find what you're looking for in case the name isn't so descriptive.

Comments

Popular Posts