Ask Your Question

Revision history [back]

Agent Photos

I am in the midst of making a website, I have all the property info and photos pulling fine, I ran into issues when I tried to retrieve an agents photo using the following code:

echo 'Presented By: ' . $record['LA1_UserFirstName'] . ' ' . $record['LA1_UserLastName'] . "\n";
                        print_r($record['LO1_OrganizationName']);

                        $agentPhoto = $rets->GetObject("Agent", "Photo", $record['LA1_AgentID'], "0", 1);

                        foreach ($agentPhoto as $aphoto){
                            if($aphoto['Success'] == true) {
                                echo '<div class="preview-image"  style="border: 1px solid #4C3C1B; padding: 2px;">';
                                $imageSrc = $photo['Location'];
                                echo '<img class="" src="'.$imageSrc.'" />';
                                echo '</div>';
                            }                    
                        }

It seems as though no object is found this way, even though in the feed, under Agent resource, Photo is listed as one of the objects. Has anyone had better luck than I?

Cheers!

Agent Photos

I am in the midst of making a website, I have all the property info and photos pulling fine, I ran into issues when I tried to retrieve an agents photo using the following code:

echo 'Presented By: ' . $record['LA1_UserFirstName'] . ' ' . $record['LA1_UserLastName'] . "\n";
 print_r($record['LO1_OrganizationName']);

 $agentPhoto = $rets->GetObject("Agent", "Photo", $record['LA1_AgentID'], "0", 1);

 foreach ($agentPhoto as $aphoto){
     if($aphoto['Success'] == true) {
         echo '<div class="preview-image"  style="border: 1px solid #4C3C1B; padding: 2px;">';
         $imageSrc = $photo['Location'];
         echo '<img class="" src="'.$imageSrc.'" />';
         echo '</div>';
     }                    
 }

It seems as though no object is found this way, even though in the feed, under Agent resource, Photo is listed as one of the objects. Has anyone had better luck than I?

Cheers!