get_currency($applicant_profile['currency']);
if ( $selected_currency !== false )
{
$currency = $selected_currency['currency_symbol'];
}
}
echo '
' . esc_html( __('Applicant Requirements', 'propertyhive') ) . '
';
$requirements = array();
if (
isset($applicant_profile['department']) &&
( $applicant_profile['department'] == 'residential-sales' || ph_get_custom_department_based_on($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' => $currency . ph_display_price_field($applicant_profile['max_price']),
);
}
if (
isset($applicant_profile['department']) &&
( $applicant_profile['department'] == 'residential-sales' || ph_get_custom_department_based_on($applicant_profile['department']) == 'residential-sales'
)
)
{
if ( $percentage_lower != '' && $percentage_higher != '' )
{
$match_price_range_lower = '';
$match_price_range_lower_display = '';
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']) && $applicant_profile['max_price'] != '' )
{
$match_price_range_lower = $applicant_profile['max_price'] - ( $applicant_profile['max_price'] * ( $percentage_lower / 100 ) );
}
}
else
{
$match_price_range_lower = $applicant_profile['match_price_range_lower'];
}
$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']) && $applicant_profile['max_price'] != '' )
{
$match_price_range_higher = $applicant_profile['max_price'] + ( $applicant_profile['max_price'] * ( $percentage_higher / 100 ) );
}
}
else
{
$match_price_range_higher = $applicant_profile['match_price_range_higher'];
}
if (
$match_price_range_lower != '' && $match_price_range_higher != ''
)
{
$requirements[] = array(
'label' => __( 'Match Price Range', 'propertyhive' ),
'value' => $currency . ph_display_price_field($match_price_range_lower) . ' to ' . $currency . ph_display_price_field($match_price_range_higher),
);
}
}
}
if (
isset($applicant_profile['department']) && ( $applicant_profile['department'] == 'residential-lettings' || ph_get_custom_department_based_on($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' => $currency . ph_display_price_field($applicant_profile['max_rent']) . ' ' . $applicant_profile['rent_frequency'],
);
}
if (
isset($applicant_profile['department']) &&
(
$applicant_profile['department'] == 'residential-sales' ||
$applicant_profile['department'] == 'residential-lettings' ||
ph_get_custom_department_based_on($applicant_profile['department']) == 'residential-sales' ||
ph_get_custom_department_based_on($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' || ph_get_custom_department_based_on($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 ( get_option('propertyhive_applicant_locations_type') != 'text' )
{
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' : '' ),
);
}
}
}
else
{
if ( isset($applicant_profile['location_text']) && trim($applicant_profile['location_text']) != '' )
{
$location_value = trim($applicant_profile['location_text']);
if ( isset($applicant_profile['location_radius']) && $applicant_profile['location_radius'] != '' )
{
$location_value .= ' (Within '. $applicant_profile['location_radius'] .' Miles)';
}
$requirements[] = array(
'label' => __( 'Location', 'propertyhive' ),
'value' => $location_value,
);
}
}
$requirements = apply_filters( 'propertyhive_applicant_requirements_display', $requirements, $contact_id, $applicant_profile );
if ( !empty($requirements) )
{
foreach ( $requirements as $requirement )
{
echo '
' . esc_html($requirement['label']) . ':
' . $requirement['value'] . '
';
}
}
if ( isset($applicant_profile['notes']) && $applicant_profile['notes'] != '' )
{
echo '
Additional Requirement Notes:
' . nl2br( strip_tags( $applicant_profile['notes'] ) ) . '
';
}
echo '
';
?>
__( 'Email', 'propertyhive' ),
'not_interested' => __( 'Not Suitable', 'propertyhive' )
);
$select_all_actions = apply_filters( 'propertyhive_matching_select_all_actions', $select_all_actions );
?>
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 '