Model/Apiconnector/Contact.php
public function sync()
    {
        //result message
        $result = ['success' => true, 'message' => ''];
        //starting time for sync
        $this->start = microtime(true);
        //export bulk contacts
        foreach ($this->helper->getWebsites() as $website) {
            $apiEnabled = $this->helper->isEnabled($website);
            $customerSyncEnabled = $this->helper->isCustomerSyncEnabled(
                $website
            );
            $customerAddressBook = $this->helper->getCustomerAddressBook(
                $website
            );

            //api, customer sync and customer address book must be enabled
            if ($apiEnabled && $customerSyncEnabled && $customerAddressBook) {
                //start log
                $contactsUpdated = $this->exportCustomersForWebsite($website);

                // show message for any number of customers
                if ($contactsUpdated) {
                    $result['message'] .=  $website->getName()
                        . ', updated contacts ' . $contactsUpdated;
                }
            }
        }
        //sync proccessed
        if ($this->countCustomers) {
            $message = '----------- Customer sync ----------- : ' .
                gmdate('H:i:s', microtime(true) - $this->start) .
                ', Total contacts = ' . $this->countCustomers;
            $this->helper->log($message);
            $message .= $result['message'];
            $result['message'] = $message;
        }

        return $result;
    }
public function sync()
    {
        //result message
        $result = ['success' => true, 'message' => ''];
        //starting time for sync
        $this->start = microtime(true);
        //export bulk contacts
        foreach ($this->helper->getWebsites() as $website) {
            $apiEnabled = $this->helper->isEnabled($website);
            $customerSyncEnabled = $this->helper->isCustomerSyncEnabled(
                $website
            );
            $customerAddressBook = $this->helper->getCustomerAddressBook(
                $website
            );

            //api, customer sync and customer address book must be enabled
            if ($apiEnabled && $customerSyncEnabled && $customerAddressBook) {
                //start log
                $contactsUpdated = $this->exportCustomersForWebsite($website);

                // show message for any number of customers
                if ($contactsUpdated) {
                    $result['message'] .=  $website->getName()
                        . ', updated contacts ' . $contactsUpdated;
                }
            }
        }
        //sync proccessed
        if ($this->countCustomers) {
            $message = '----------- Customer sync ----------- : ' .
                gmdate('H:i:s', microtime(true) - $this->start) .
                ', Total contacts = ' . $this->countCustomers;
            $this->helper->log($message);
            $message .= $result['message'];
            $result['message'] = $message;
        }

        return $result;
    }
public function sync ( ) { //result message $ result = [ 'success' => true , 'message' => '' ] ; //starting time for sync $ this -> start = microtime ( true ) ; //export bulk contacts foreach ( $ this -> helper -> getWebsites ( ) as $ website ) { $ apiEnabled = $ this -> helper -> isEnabled ( $ website ) ; $ customerSyncEnabled = $ this -> helper -> isCustomerSyncEnabled ( $ website ) ; $ customerAddressBook = $ this -> helper -> getCustomerAddressBook ( $ website ) ; //api, customer sync and customer address book must be enabled if ( $ apiEnabled && $ customerSyncEnabled && $ customerAddressBook ) { //start log $ contactsUpdated = $ this -> exportCustomersForWebsite ( $ website ) ; // show message for any number of customers if ( $ contactsUpdated ) { $ result [ 'message' ] .= $ website -> getName ( ) . ', updated contacts ' . $ contactsUpdated ; } } } //sync proccessed if ( $ this -> countCustomers ) { $ message = '----------- Customer sync ----------- : ' . gmdate ( 'H:i:s' , microtime ( true ) - $ this -> start ) . ', Total contacts = ' . $ this -> countCustomers ; $ this -> helper -> log ( $ message ) ; $ message .= $ result [ 'message' ] ; $ result [ 'message' ] = $ message ; } return $ result ; }
Contact sync.

@return array
Contact sync .