Applicant Requirements
';
$requirements = array();
if (
isset($applicant_profile['department']) && $applicant_profile['department'] == 'residential-sales' &&
isset($applicant_profile['max_price_actual']) && $applicant_profile['max_price_actual'] != '' && $applicant_profile['max_price_actual'] != 0
)
{
$requirements[] = array(
'label' => __( 'Maximum Price', 'propertyhive' ),
'value' => '£' . number_format($applicant_profile['max_price']),
);
}
if (
isset($applicant_profile['department']) && $applicant_profile['department'] == 'residential-sales'
)
{
if ( $percentage_lower != '' && $percentage_higher != '' )
{
$match_price_range_lower = '';
if ( !isset($applicant_profile['match_price_range_lower_actual']) || ( isset($applicant_profile['match_price_range_lower_actual']) && $applicant_profile['match_price_range_lower_actual'] == '' ) )
{
if ( isset($applicant_profile['max_price_actual']) && $applicant_profile['max_price_actual'] != '' )
{
$match_price_range_lower = $applicant_profile['max_price_actual'] - ( $applicant_profile['max_price_actual'] * ( $percentage_lower / 100 ) );
}
}
else
{
$match_price_range_lower = $applicant_profile['match_price_range_lower_actual'];
}
$match_price_range_higher = '';
if ( !isset($applicant_profile['match_price_range_higher_actual']) || ( isset($applicant_profile['match_price_range_higher_actual']) && $applicant_profile['match_price_range_higher_actual'] == '' ) )
{
if ( isset($applicant_profile['max_price_actual']) && $applicant_profile['max_price_actual'] != '' )
{
$match_price_range_higher = $applicant_profile['max_price_actual'] + ( $applicant_profile['max_price_actual'] * ( $percentage_higher / 100 ) );
}
}
else
{
$match_price_range_higher = $applicant_profile['match_price_range_higher_actual'];
}
if (
$match_price_range_lower != '' && $match_price_range_higher != ''
)
{
$requirements[] = array(
'label' => __( 'Match Price Range', 'propertyhive' ),
'value' => '£' . number_format($match_price_range_lower) . ' to £' . number_format($match_price_range_higher),
);
}
}
}
if (
isset($applicant_profile['department']) && $applicant_profile['department'] == 'residential-lettings' &&
isset($applicant_profile['max_price_actual']) && $applicant_profile['max_price_actual'] != '' && $applicant_profile['max_price_actual'] != 0
)
{
$requirements[] = array(
'label' => __( 'Maximum Rent', 'propertyhive' ),
'value' => '£' . number_format($applicant_profile['max_rent']) . ' ' . $applicant_profile['rent_frequency'],
);
}
if (
isset($applicant_profile['department']) &&
( $applicant_profile['department'] == 'residential-sales' || $applicant_profile['department'] == 'residential-lettings' )
)
{
if ( isset($applicant_profile['min_beds']) && $applicant_profile['min_beds'] != '' && $applicant_profile['min_beds'] != 0 )
{
$requirements[] = array(
'label' => __( 'Minimum Beds', 'propertyhive' ),
'value' => $applicant_profile['min_beds'],
);
}
if ( isset($applicant_profile['property_types']) && is_array($applicant_profile['property_types']) && !empty($applicant_profile['property_types']) )
{
$terms = get_terms('property_type', array('hide_empty' => false, 'fields' => 'names', 'include' => $applicant_profile['property_types']));
if ( ! empty( $terms ) && ! is_wp_error( $terms ) )
{
$sliced_terms = array_slice( $terms, 0, 2 );
$requirements[] = array(
'label' => __( 'Property Types', 'propertyhive' ),
'value' => implode(", ", $sliced_terms) . ( (count($terms) > 2) ? '
+ ' . (count($terms) - 2) . ' more' : '' ),
);
}
}
}
if (
isset($applicant_profile['department']) &&
( $applicant_profile['department'] == 'commercial' )
)
{
if ( isset($applicant_profile['available_as']) && is_array($applicant_profile['available_as']) && !empty($applicant_profile['available_as']) )
{
$available_as = array();
if ( in_array('sale', $applicant_profile['available_as']) )
{
$available_as[] = 'For Sale';
}
if ( in_array('rent', $applicant_profile['available_as']) )
{
$available_as[] = 'To Rent';
}
$requirements[] = array(
'label' => __( 'Available As', 'propertyhive' ),
'value' => implode(", ", $available_as),
);
}
if (
(isset($applicant_profile['min_floor_area_actual']) && $applicant_profile['min_floor_area_actual'] != '')
||
(isset($applicant_profile['max_floor_area_actual']) && $applicant_profile['max_floor_area_actual'] != '')
)
{
$sizes = array('min' => '', 'max' => '');
$value = '';
if ( isset($applicant_profile['min_floor_area_actual']) && $applicant_profile['min_floor_area_actual'] != '' )
{
$sizes['min'] = $applicant_profile['min_floor_area_actual'];
}
if ( isset($applicant_profile['max_floor_area_actual']) && $applicant_profile['max_floor_area_actual'] != '' )
{
$sizes['max'] = $applicant_profile['max_floor_area_actual'];
}
if ( $sizes['min'] != '' && $sizes['max'] != '' )
{
$value = number_format($sizes['min']) . ' - ' . number_format($sizes['max']) . ' Sq Ft';
}
if ( $sizes['min'] != '' && $sizes['max'] == '' )
{
$value = 'From ' . number_format($sizes['min']) . ' Sq Ft';
}
if ( $sizes['min'] == '' && $sizes['max'] != '' )
{
$value = 'Up To ' . number_format($sizes['max']) . ' Sq Ft';
}
if ( $value != '' )
{
$requirements[] = array(
'label' => __( 'Floor Area', 'propertyhive' ),
'value' => $value,
);
}
}
if ( isset($applicant_profile['commercial_property_types']) && is_array($applicant_profile['commercial_property_types']) && !empty($applicant_profile['commercial_property_types']) )
{
$terms = get_terms('commercial_property_type', array('hide_empty' => false, 'fields' => 'names', 'include' => $applicant_profile['commercial_property_types']));
if ( ! empty( $terms ) && ! is_wp_error( $terms ) )
{
$sliced_terms = array_slice( $terms, 0, 2 );
$requirements[] = array(
'label' => __( 'Property Types', 'propertyhive' ),
'value' => implode(", ", $sliced_terms) . ( (count($terms) > 2) ? '
+ ' . (count($terms) - 2) . ' more' : '' ),
);
}
}
}
if ( isset($applicant_profile['locations']) && is_array($applicant_profile['locations']) && !empty($applicant_profile['locations']) )
{
$terms = get_terms('location', array('hide_empty' => false, 'fields' => 'names', 'include' => $applicant_profile['locations']));
if ( ! empty( $terms ) && ! is_wp_error( $terms ) )
{
$sliced_terms = array_slice( $terms, 0, 2 );
$requirements[] = array(
'label' => __( 'Locations', 'propertyhive' ),
'value' => implode(", ", $sliced_terms) . ( (count($terms) > 2) ? '
+ ' . (count($terms) - 2) . ' more' : '' ),
);
/*echo '
Locations:
' . implode(", ", $sliced_terms) . ( (count($terms) > 2) ? ' + ' . (count($terms) - 2) . ' more' : '' ) . '
';*/
}
}
$requirements = apply_filters( 'propertyhive_applicant_requirements_display', $requirements, $contact_id, $applicant_profile );
if ( !empty($requirements) )
{
foreach ( $requirements as $requirement )
{
echo '
' . $requirement['label'] . ':
' . $requirement['value'] . '
';
}
}
if ( isset($applicant_profile['notes']) && $applicant_profile['notes'] != '' )
{
echo '
Additional Requirement Notes:
' . nl2br( strip_tags( $applicant_profile['notes'] ) ) . '
';
}
echo '
';
?>
id]) && is_array($applicant_profile_match_history[$property->id]) && !empty($applicant_profile_match_history[$property->id]) )
{
$previously_sent = $applicant_profile_match_history[$property->id];
}
$on_market_change_date = $property->_on_market_change_date;
$price_change_date = $property->_price_change_date;
echo '