propertyhive / WP-Property-Hive

The complete estate agency software plugin for WordPress
Other
26 stars 26 forks source link

What are the Applicant database field names? #164

Closed PaulNWard closed 3 years ago

PaulNWard commented 3 years ago

Hi there, I'm trying to import my clients into the property hive applicant area. On the Contact Details page I've got the telephone numbers in _telephone_number and the Emails are in _email_address I cannot find what the Relationships page fields are for Maximum Price, Minimum Bedrooms, Property Types, Locations and Additional Requirements. e.g. for bedrooms I have tried _bedrooms _minimum_bedrooms _minimum_bedrooms_0 _relationships_minimum_bedrooms _minimum_bedrooms_0_field Can anyone let me know where to find the field names please? Regards, Paul Ward

propertyhive commented 3 years ago

@PaulNWard Assuming an applicant has one profile/relationship the following meta data will be used:

_applicant_profiles_1 - set to 1 _applicant_profile_0 - A serialized array of the applicant requirements

Hope that helps but let me know if any further questions, Steve

PaulNWard commented 3 years ago

Hi Steve, Thank you, getting closer but still stuck on 2 fields. I have _contact_types key 0 value applicant _applicant_profiles_1 value 1 _applicant_profile_0 and have managed to get the department, max_price, min_beds and send_matching_properties in but still not managed to get the property types and locations in. Can you tell me what these fields are called please? Regards, Paul

http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail Virus-free. www.avg.com http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Wed, 14 Jul 2021 at 11:24, Property Hive @.***> wrote:

@PaulNWard https://github.com/PaulNWard Assuming an applicant has one profile/relationship the following meta data will be used:

_applicant_profiles_1 - set to 1 _applicant_profile_0 - A serialized array of the applicant requirements

Hope that helps but let me know if any further questions, Steve

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/propertyhive/WP-Property-Hive/issues/164#issuecomment-879739343, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUWN5ON5Y2SF7NAKSNY7A5LTXVJUBANCNFSM5ALAS6RQ .

propertyhive commented 3 years ago

Property type and location are part of the serialized applicant profile as well. Here's an example:

a:14:{s:10:"department";s:17:"residential-sales";s:9:"max_price";s:6:"610000";s:16:"max_price_actual";s:6:"610000";s:23:"match_price_range_lower";s:6:"130000";s:30:"match_price_range_lower_actual";s:6:"130000";s:24:"match_price_range_higher";s:6:"650000";s:31:"match_price_range_higher_actual";s:6:"650000";s:8:"min_beds";s:1:"1";s:14:"property_types";a:2:{i:0;s:2:"18";i:1;s:5:"12607";}s:9:"locations";a:1:{i:0;s:4:"9587";}s:5:"notes";s:0:"";s:24:"send_matching_properties";s:0:"";s:19:"auto_match_disabled";s:0:"";s:7:"grading";s:3:"hot";}

You'll see property types and locations are IDs which correspond to the types and locations set under 'property Hive > Settings > Custom Fields'.

Hope that helps, Steve

PaulNWard commented 3 years ago

Hi Steve, As the import coming in lists the Property Type by Villa, Apartment and Land do I need to create a function to map these to their IDs of 2, 120 and 213? If so I think I will have to leave that bit out. Regards, Paul

http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail Virus-free. www.avg.com http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Wed, 14 Jul 2021 at 12:15, Property Hive @.***> wrote:

Property type and location are part of the serialized applicant profile as well. Here's an example:

a:14:{s:10:"department";s:17:"residential-sales";s:9:"max_price";s:6:"610000";s:16:"max_price_actual";s:6:"610000";s:23:"match_price_range_lower";s:6:"130000";s:30:"match_price_range_lower_actual";s:6:"130000";s:24:"match_price_range_higher";s:6:"650000";s:31:"match_price_range_higher_actual";s:6:"650000";s:8:"min_beds";s:1:"1";s:14:"property_types";a:2:{i:0;s:2:"18";i:1;s:5:"12607";}s:9:"locations";a:1:{i:0;s:4:"9587";}s:5:"notes";s:0:"";s:24:"send_matching_properties";s:0:"";s:19:"auto_match_disabled";s:0:"";s:7:"grading";s:3:"hot";}

You'll see property types and locations are IDs which correspond to the types and locations set under 'property Hive > Settings > Custom Fields'.

Hope that helps, Steve

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/propertyhive/WP-Property-Hive/issues/164#issuecomment-879771792, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUWN5OIDNF3I2733WSR3B6TTXVPVJANCNFSM5ALAS6RQ .

propertyhive commented 3 years ago

Yes you would.. or you could use a function like get_term_by (https://developer.wordpress.org/reference/functions/get_term_by/) to do this programatically I guess.

Thanks, Steve