/** * Get connector contact. * * @return mixed */ public function getConnectorContact() { $contact = $this->_getApiClient()->getContactByEmail($this->getCustomer()->getEmail()); if ($contact->id) { $this->customerSession->setConnectorContactId($contact->id); $this->contactId = $contact->id; } else { $contact = $this->_getApiClient()->postContacts($this->getCustomer()->getEmail()); if ($contact->id) { $this->customerSession->setConnectorContactId($contact->id); $this->contactId = $contact->id; } } return $contact; }