diff --git a/classes/shop_addressinfo.php b/classes/shop_addressinfo.php
index 900927a..93c7317 100644
--- a/classes/shop_addressinfo.php
+++ b/classes/shop_addressinfo.php
@@ -254,7 +254,7 @@ public function save_to_order($order, $billing=true)
/**
* Checks whether the address represented with the object matches the address represented with another address information object.
* @documentable
- * @param Shop_CheckoutAddressInfo $address_info Specifies another address information object to compare with.
+ * @param Shop_AddressInfo $address_info Specifies another address information object to compare with.
* @return boolean Returns TRUE if the address matches. Returns FALSE otherwise.
*/
public function equals($address_info)
diff --git a/docs/actions/checkout_billing_info.htm b/docs/actions/checkout_billing_info.htm
index aa22713..014f437 100644
--- a/docs/actions/checkout_billing_info.htm
+++ b/docs/actions/checkout_billing_info.htm
@@ -2,7 +2,7 @@
Variables
- - $billing_info – an object of the Shop_CheckoutAddressInfo class representing a customer's billing name and address.
+ - $billing_info – an object of the Shop_AddressInfo class representing a customer's billing name and address.
- $countries – a collection of countries for populating the Country list. The collection is an object of the Db_DataCollection class. Each element in the collection is an object of the Shop_Country class.
- $states – a collection of countries for populating the State list. The collection is an object of the Db_DataCollection class. Each element in the collection is an object of the Shop_CountryState class.
- $discount - estimated cart discount. You can display this value during the checkout process.
diff --git a/docs/actions/checkout_shipping_info.htm b/docs/actions/checkout_shipping_info.htm
index 8b4803a..cd2ab03 100644
--- a/docs/actions/checkout_shipping_info.htm
+++ b/docs/actions/checkout_shipping_info.htm
@@ -2,7 +2,7 @@
Variables
- - $shipping_info – an object of the Shop_CheckoutAddressInfo class representing a customer's shipping name and address.
+ - $shipping_info – an object of the Shop_AddressInfo class representing a customer's shipping name and address.
- $countries – a collection of countries for populating the Country list. The collection is an object of the Db_DataCollection class. Each element in the collection is an object of the Shop_Country class.
- $states – a collection of countries for populating the State list. The collection is an object of the Db_DataCollection class. Each element in the collection is an object of the Shop_CountryState class.
- $discount - estimated cart discount. You can display this value during the checkout process.
diff --git a/models/shop_order.php b/models/shop_order.php
index 906c3bf..1f4f165 100644
--- a/models/shop_order.php
+++ b/models/shop_order.php
@@ -547,25 +547,26 @@ public function after_validation($deferred_session_key = null)
* Returns shipping address information object.
* The object is populated with shipping address information from the order.
* @documentable
- * @return Shop_CheckoutAddressInfo Returns an address information object.
+ * @return Shop_AddressInfo Returns an address information object.
*/
public function get_shipping_address_info()
{
- $result = new Shop_CheckoutAddressInfo();
- $result->act_as_billing_info = false;
+ $result = new Shop_AddressInfo();
+ $result->act_as_billing_info = false;
- $result->first_name = $this->shipping_first_name;
- $result->last_name = $this->shipping_last_name;
- $result->company = $this->shipping_company;
- $result->phone = $this->shipping_phone;
- $result->country = $this->shipping_country_id;
- $result->state = $this->shipping_state_id;
- $result->street_address = $this->shipping_street_addr;
- $result->city = $this->shipping_city;
- $result->zip = $this->shipping_zip;
- $result->shipping_addr_is_business = $this->is_business;
+ $result->first_name = $this->shipping_first_name;
+ $result->last_name = $this->shipping_last_name;
+ $result->company = $this->shipping_company;
+ $result->phone = $this->shipping_phone;
+ $result->email = $this->billing_email ? $this->billing_email : $this->customer->email;
+ $result->street_address = $this->shipping_street_addr;
+ $result->city = $this->shipping_city;
+ $result->state = $this->shipping_state_id;
+ $result->country = $this->shipping_country_id;
+ $result->zip = $this->shipping_zip;
+ $result->shipping_addr_is_business = $this->is_business;
- return $result;
+ return $result;
}
/**
@@ -2069,7 +2070,7 @@ public function create_order_copy( $items = array(), $save = true, $session_key
* Apply shipping tax
*/
- $shipping_info = new Shop_CheckoutAddressInfo();
+ $shipping_info = new Shop_AddressInfo();
$shipping_info->act_as_billing_info = false;
$shipping_info->load_from_customer( $customer );