Exemplo n.º 1
0
 /**
  * Get model data as array
  * 
  * @return array
  */
 public function getData()
 {
     $data = array('firstName' => $this->_firstName, 'lastName' => $this->_lastName, 'gender' => $this->_gender, 'dob' => $this->_dateOfBirth, 'ip' => $this->_ip, 'company' => isset($this->_company) ? $this->_company : null, 'vatId' => isset($this->_vatId) ? $this->_vatId : null, 'email' => $this->_email, 'fax' => isset($this->_fax) ? $this->_fax : null, 'phone' => $this->_phone, 'billing' => $this->_billingAddressInfo->getData(), 'shipping' => $this->_shippingAddressInfo->getData(), 'bankAccount' => isset($this->_bankAccount) ? $this->_bankAccount->getData() : null, 'nationality' => $this->_nationality, 'creditInquiry' => $this->_creditInquiry);
     return $data;
 }
Exemplo n.º 2
0
 /**
  * Retrieve a shippingAddressInfo model
  * 
  * @param order $order
  * @param int $orderId
  * @return rpAddressInfo
  */
 private static function getShippingAdressInfo(order $order, $orderId)
 {
     $countryId = is_array($order->delivery['country']) ? $order->delivery['country']['iso_code_2'] : rpDb::getShopOrderDataEntry($orderId, 'delivery_country_iso_code_2');
     $addressInfo = new rpAddressInfo();
     $addressInfo->setCity($order->delivery['city'])->setCountryId($countryId)->setStreet($order->delivery['street_address'])->setZip($order->delivery['postcode']);
     $addressInfo->setType('DELIVERY');
     return $addressInfo;
 }