Búsqueda de resultados

Ejemplo básico

<?php
include "api.inc";

//CHANGE THIS APIKEY WITH YOUR REAL STATE APIKEY 
$auth = new TokkoAuth('5940ea45eb7cfb55228bec0b958ea9c0be151757');

// CREATE PROPERTY SEARCH OBJECT
$search = new TokkoSearch($auth);

// ORDER BY, LIMIT, ORDER
$search->do_search();
?>

<script src="https://code.jquery.com/jquery-3.3.1.slim.js" integrity="sha256-fNXJFIlca05BIO2Y5zh1xrShK3ME+/lYZ0j+ChxX2DA="
crossorigin="anonymous"></script>

<p>MOSTRANDO <?echo  $search->get_result_count();?> RESULTADOS</p>
<p>ORDENAR POR</p>

<?php 

$search->deploy_reorder_selects('reorder', ["Ordenado por", "Orden"], ['price'=>'Precio', 'room_amount'=>'Ambientes'], "campos_ordenar", [$search->get_search_order_by(),$search->get_search_order()]); 

?>

<br><br><br>
<p>

Pagina <?php echo $search->get_current_page();?> de <? echo $search->get_result_page_count();
?>
<?php if ($search->get_previous_page_or_null()){?><a href='<?echo $search->get_url_for_page($search->get_previous_page_or_null());?>'><-Pagina anterior</a><?}?> <?if ($search->get_next_page_or_null()){?><a href='<?echo $search->get_url_for_page($search->get_next_page_or_null());?>'>Pagina siguiente -></a><?}?>

</p>
<ul id="lista_resultados">
<? foreach ($search->get_properties() as $property){?>
<li>
<div>
<p><? echo strtoupper($property->get_field("type")->name);?> EN <? echo strtoupper($property->get_field("location")->short_location);?></p>
<p>Codigo de Propiedad: <?echo $property->get_field("reference_code");?><br />
Precio: <? echo $property->get_field("web_price")?  implode(" | ",$property->get_available_operations()): "Consulte precio;"?><br/>
Ambientes: <?echo $property->get_field("room_amount");?><br/>
Baños: <?echo $property->get_field("bathroom_amount");?><br />
Metros lote: <?echo $property->get_field("surface");?> m2<br />
Metros construidos: <?echo $property->get_field("roofed_surface");?></p>
<p><? echo strlen($property->get_field("description")) > 150 ? substr($property->get_field("description"),0,150) : $property->get_field("description");?></p>
<? if($property->get_cover_picture()){ ?>
<img width="250" height="220" src="<? echo $property->get_cover_picture()->thumb;?>" alt="" border="0"/>
<?}?>
<a href="./ficha.php?id=<?echo $property->get_field("id");?>" class="ver_mas_res">VER MAS</a>
</div>
</li>
<?}?>
</ul>