View Single Post
  #19  
Old 09-07-2010, 08:48 AM
williamdswanepoel williamdswanepoel is offline
Mosets'd
 
Join Date: Aug 2010
Posts: 28
Default Changed code for _summary.php

Ok I changed the code in _summary.php to code as recommended at top of thread to:
Code:
<?php 
    foreach ($this->extrafields as $extrafield) :  
        if( isset($this->property->PropertyField) ) :
            foreach ($this->property->PropertyField as $pf) :  
                if( $extrafield->id == $pf->field ) : 
                    $fields->{$extrafield->name} = $pf->value; 
                    break; 
                endif; 
            endforeach; 
        endif; 
    endforeach; 
?>
But now the price does not show any value? So I guess there must be a problem with getting the price?
Code:
<?php $new_price = number_format ($this->row->price); ?>
             <font color="red">
                 <b>Price: N$ <?php echo $new_price; ?></b>
             </font>
            <br />
          <?php
Looks like none of my core fields are displayed, only my extra fields are displayed. What could be the problem as I also use the following code for the other core field that is not displayed:
Code:
<?php echo $this->row->suburb; ?>
This code works on the property.php page but not on _summary.php.

Thanks