/** * {@inheritDoc} */ public function getBillingAddress() { $this->__initializer__ && $this->__initializer__->__invoke($this, 'getBillingAddress', array()); return parent::getBillingAddress(); }
/** * Preprocess profile * * @param \XLite\Model\Profile $profile Profile * @param array $column Column data * @param \XLite\Model\Order $entity Order * * @return string */ protected function preprocessProfile(\XLite\Model\Profile $profile, array $column, \XLite\Model\Order $entity) { $address = $profile->getBillingAddress() ?: $profile->getShippingAddress(); return $address ? $address->getName() : $profile->getLogin(); }
/** * Format language for request ("language_country"="en_EN") * * @param \XLite\Model\Profile $profile Profile model * * @return string */ protected function getFormattedLanguage($profile) { return \XLite\Core\Session::getInstance()->getLanguage()->getCode() . '_' . strtoupper($profile->getBillingAddress()->getCountry()->getCode()); }