Changeset 3490077
- Timestamp:
- 03/24/2026 01:59:38 PM (4 days ago)
- Location:
- houzez-property-feed/trunk
- Files:
-
- 1 added
- 11 edited
-
README.txt (modified) (3 diffs)
-
houzez-property-feed.php (modified) (2 diffs)
-
includes/class-houzez-property-feed-admin-logs-export-table.php (modified) (5 diffs)
-
includes/format-functions.php (modified) (1 diff)
-
includes/import-formats/class-houzez-property-feed-format-10ninety.php (modified) (1 diff)
-
includes/import-formats/class-houzez-property-feed-format-acquaint.php (modified) (1 diff)
-
includes/import-formats/class-houzez-property-feed-format-agestanet.php (modified) (1 diff)
-
includes/import-formats/class-houzez-property-feed-format-apimo.php (modified) (4 diffs)
-
includes/import-formats/class-houzez-property-feed-format-propctrl.php (modified) (2 diffs)
-
includes/import-formats/class-houzez-property-feed-format-property-finder-api.php (added)
-
includes/import-formats/class-houzez-property-feed-format-resales-online.php (modified) (3 diffs)
-
includes/import-functions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
houzez-property-feed/trunk/README.txt
r3467631 r3490077 4 4 Requires at least: 3.8 5 5 Tested up to: 6.9 6 Stable tag: 2.5.4 27 Version: 2.5.4 26 Stable tag: 2.5.43 7 Version: 2.5.43 8 8 Homepage: https://houzezpropertyfeed.com 9 9 License: GPLv3 … … 50 50 * MLS/IDX (assuming XML URL can be provided) 51 51 * MLS Grid 52 * myCRM / PF Expert from Property Finder 52 * myCRM / PF Expert from Property Finder UAE (XML and API) 53 53 * OpenImmo 54 54 * Pixxi … … 147 147 == Changelog == 148 148 149 = 2.5.43 - 2026-03-24 = 150 * Added preliminary support for importing from Property Finder UAE using their API 151 * Added more logging to PropCtrl state change PUT request 152 * Updated which field is used for Apimo land area 153 * Corrected wrong property count showing in export logs being wrong due to hitting MySQL 'group_concat_max_len' setting 154 149 155 = 2.5.42 - 2026-02-23 = 150 156 * Added EPC ratings to Zoopla exports -
houzez-property-feed/trunk/houzez-property-feed.php
r3467631 r3490077 4 4 * Plugin Uri: https://houzezpropertyfeed.com 5 5 * Description: Automatically import properties to Houzez from estate agency CRMs and export to portals 6 * Version: 2.5.4 26 * Version: 2.5.43 7 7 * Author: PropertyHive 8 8 * Author URI: https://wp-property-hive.com … … 20 20 * @var string 21 21 */ 22 public $version = '2.5.4 2';22 public $version = '2.5.43'; 23 23 24 24 /** -
houzez-property-feed/trunk/includes/class-houzez-property-feed-admin-logs-export-table.php
r3255514 r3490077 108 108 if ( $item->property_ids != '' ) 109 109 { 110 $explode_property_ids = explode(",", $item->property_ids);110 $explode_property_ids = $item->property_ids; 111 111 if ( count($explode_property_ids) == 1 ) 112 112 { … … 168 168 $export_id = !empty($_GET['export_id']) ? (int)$_GET['export_id'] : ''; 169 169 170 /*$extra_query = "";171 if ( !empty($export_id) )170 $extra_query = ""; 171 /*if ( !empty($export_id) ) 172 172 { 173 173 $export_settings = houzez_property_feed_get_export_settings_from_id( $export_id ); … … 179 179 if ($format['method'] == 'realtime') 180 180 {*/ 181 $extra_query = ", (181 /*$extra_query = ", ( 182 182 SELECT GROUP_CONCAT(DISTINCT post_id SEPARATOR ',') 183 183 FROM … … 187 187 AND 188 188 post_id != 0 189 ) AS property_ids"; 189 ) AS property_ids";*/ 190 190 /*} 191 191 } … … 222 222 $this->items = $wpdb->get_results($query); 223 223 224 if ( is_array($this->items) ) 225 { 226 foreach ($this->items as $item) 227 { 228 $item->property_ids = $wpdb->get_col($wpdb->prepare( 229 " 230 SELECT DISTINCT post_id 231 FROM {$wpdb->prefix}houzez_property_feed_export_logs_instance_log 232 WHERE instance_id = %d 233 AND post_id != 0 234 ", 235 $item->id 236 )); 237 } 238 } 239 224 240 $this->set_pagination_args( 225 241 array( -
houzez-property-feed/trunk/includes/format-functions.php
r3457031 r3490077 2170 2170 'help_url' => 'https://houzezpropertyfeed.com/documentation/managing-imports/formats/propctrl/' 2171 2171 ), 2172 'property_finder_api' => array( 2173 'name' => __( 'Property Finder / PF Expert / myCRM API', 'houzezpropertyfeed' ), 2174 'fields' => array( 2175 array( 2176 'id' => 'api_key', 2177 'label' => __( 'API Key', 'propertyhive' ), 2178 'type' => 'text', 2179 ), 2180 array( 2181 'id' => 'api_secret', 2182 'label' => __( 'API Secret', 'propertyhive' ), 2183 'type' => 'text', 2184 ), 2185 ), 2186 'address_fields' => array( /*'city', 'community', 'sub_community'*/ ), 2187 'taxonomy_values' => array( 2188 'sales_status' => array( 2189 'Sales' => 'Sales', 2190 ), 2191 'lettings_status' => array( 2192 'Lettings' => 'Lettings', 2193 ), 2194 'property_type' => array( 2195 'bulk-sale-unit' => 'bulk-sale-unit', 2196 'warehouse' => 'warehouse', 2197 'restaurant' => 'restaurant', 2198 'roof' => 'roof', 2199 'factory' => 'factory', 2200 'half-floor' => 'half-floor', 2201 'twin-house' => 'twin-house', 2202 'cabin' => 'cabin', 2203 'land' => 'land', 2204 'bulk-rent-unit' => 'bulk-rent-unit', 2205 'ivilla' => 'ivilla', 2206 'show-room' => 'show-room', 2207 'villa' => 'villa', 2208 'co-working-space' => 'co-working-space', 2209 'apartment' => 'apartment', 2210 'whole-building' => 'whole-building', 2211 'full-floor' => 'full-floor', 2212 'hotel-apartment' => 'hotel-apartment', 2213 'office-space' => 'office-space', 2214 'retail' => 'retail', 2215 'shop' => 'shop', 2216 'duplex' => 'duplex', 2217 'townhouse' => 'townhouse', 2218 'chalet' => 'chalet', 2219 'staff-accommodation' => 'staff-accommodation', 2220 'farm' => 'farm', 2221 'medical-facility' => 'medical-facility', 2222 'palace' => 'palace', 2223 'penthouse' => 'penthouse', 2224 'clinic' => 'clinic', 2225 'cafeteria' => 'cafeteria', 2226 'bungalow' => 'bungalow', 2227 'compound' => 'compound', 2228 'rest-house' => 'rest-house', 2229 'labor-camp' => 'labor-camp', 2230 'business-center' => 'business-center', 2231 ) 2232 ), 2233 'contact_information_fields' => array( 2234 //'agent_name', 2235 ), 2236 'help_url' => 'https://houzezpropertyfeed.com/documentation/managing-imports/formats/property-finder/', 2237 //'warnings' => array_filter( array( $simplexml_warning ) ), 2238 'test_button' => true, 2239 ), 2172 2240 'property_finder' => array( 2173 'name' => __( 'Property Finder / PF Expert / myCRM ', 'houzezpropertyfeed' ),2241 'name' => __( 'Property Finder / PF Expert / myCRM XML', 'houzezpropertyfeed' ), 2174 2242 'fields' => array( 2175 2243 array( -
houzez-property-feed/trunk/includes/import-formats/class-houzez-property-feed-format-10ninety.php
r3389696 r3490077 28 28 $this->properties = array(); 29 29 30 if ( $test === false || $troubleshooting === true)30 if ( $test === false ) 31 31 { 32 32 $import_settings = houzez_property_feed_get_import_settings_from_id( $this->import_id ); 33 $test = true;34 33 } 35 34 else -
houzez-property-feed/trunk/includes/import-formats/class-houzez-property-feed-format-acquaint.php
r3389696 r3490077 26 26 $this->properties = array(); 27 27 28 if ( $test === false || $troubleshooting === true)28 if ( $test === false ) 29 29 { 30 30 $import_settings = houzez_property_feed_get_import_settings_from_id( $this->import_id ); 31 $test = true;32 31 } 33 32 else -
houzez-property-feed/trunk/includes/import-formats/class-houzez-property-feed-format-agestanet.php
r3389696 r3490077 31 31 $this->properties = array(); 32 32 33 if ( $test === false || $troubleshooting === true)33 if ( $test === false ) 34 34 { 35 35 $import_settings = houzez_property_feed_get_import_settings_from_id( $this->import_id ); 36 $test = true;37 36 } 38 37 else -
houzez-property-feed/trunk/includes/import-formats/class-houzez-property-feed-format-apimo.php
r3467631 r3490077 463 463 464 464 $floor_area = ''; 465 $land_area = '';466 465 $area_prefix = ''; 467 466 if ( isset($property['area']['value']) && !empty($property['area']['value']) ) … … 469 468 $floor_area = $property['area']['value']; 470 469 } 471 if ( isset($property['area']['total']) && !empty($property['area']['total']) )470 if ( !empty($floor_area) ) 472 471 { 473 $land_area = $property['area']['total']; 474 } 475 if ( !empty($floor_area) || !empty($land_area) ) 476 { 477 $area_prefix = 'm2'; 472 $area_prefix = 'm²'; 478 473 if ( isset($property['area']['unit']) ) 479 474 { … … 498 493 update_post_meta( $post_id, 'fave_property_size', $floor_area ); 499 494 update_post_meta( $post_id, 'fave_property_size_prefix', $area_prefix ); 495 496 $land_area = ''; 497 $area_prefix = ''; 498 if ( isset($property['areas']) && is_array($property['areas']) ) 499 { 500 foreach ( $property['areas'] as $area ) 501 { 502 if ( isset($area['type']) && $area['type'] == 101 && isset($area['area']) && !empty($area['area']) ) 503 { 504 $land_area = $area['area']; 505 $area_prefix = 'm²'; 506 } 507 } 508 } 509 if ( empty($land_area) ) 510 { 511 if ( isset($property['area']['total']) && !empty($property['area']['total']) ) 512 { 513 $land_area = $property['area']['total']; 514 $area_prefix = 'm²'; 515 if ( isset($property['area']['unit']) ) 516 { 517 switch ( (int)$property['area']['unit'] ) 518 { 519 case 1: $area_prefix = 'm²'; break; 520 case 2: $area_prefix = 'sq ft'; break; 521 case 3: $area_prefix = 'kanal'; break; 522 case 4: $area_prefix = 'marla'; break; 523 case 5: $area_prefix = 'sq yd'; break; 524 case 6: $area_prefix = 'acre'; break; 525 case 7: $area_prefix = 'ha'; break; 526 case 8: $area_prefix = 'ares'; break; 527 case 9: $area_prefix = 'toises'; break; 528 case 10: $area_prefix = 'perches'; break; 529 case 11: $area_prefix = 'arpents'; break; 530 case 12: $area_prefix = 'centiare'; break; 531 } 532 533 } 534 } 535 } 500 536 update_post_meta( $post_id, 'fave_property_land', $land_area ); 501 537 update_post_meta( $post_id, 'fave_property_land_postfix', $area_prefix ); … … 525 561 526 562 $featured = '0'; 527 update_post_meta( $post_id, 'fave_featured', $featured);563 add_post_meta( $post_id, 'fave_featured', $featured, true ); 528 564 update_post_meta( $post_id, 'fave_agent_display_option', ( isset($import_settings['agent_display_option']) ? $import_settings['agent_display_option'] : 'none' ) ); 529 565 -
houzez-property-feed/trunk/includes/import-formats/class-houzez-property-feed-format-propctrl.php
r3457031 r3490077 2194 2194 $this->log_error( 'Response when updating status in PropCtrl: ' . $response->get_error_message(), $property['listingId'], $post_id ); 2195 2195 } 2196 elseif ( wp_remote_retrieve_response_code($response) !== 200 ) 2197 { 2198 $this->log_error( wp_remote_retrieve_response_code($response) . ' response received when changing property state. Error message: ' . wp_remote_retrieve_response_message($response) ); 2199 } 2200 else 2201 { 2202 $this->log( 'State of property in PropCtrl updated successfully', $property['listingId'], $post_id ); 2203 } 2196 2204 } 2197 2205 else … … 2225 2233 $this->log_error( 'Response when updating status in PropCtrl: ' . $response->get_error_message(), $property['listingId'], $post_id ); 2226 2234 } 2235 elseif ( wp_remote_retrieve_response_code($response) !== 200 ) 2236 { 2237 $this->log_error( wp_remote_retrieve_response_code($response) . ' response received when changing property state. Error message: ' . wp_remote_retrieve_response_message($response) ); 2238 } 2239 else 2240 { 2241 $this->log( 'State of property in PropCtrl updated successfully', $property['listingId'], $post_id ); 2242 } 2227 2243 } 2228 2244 -
houzez-property-feed/trunk/includes/import-formats/class-houzez-property-feed-format-resales-online.php
r3467631 r3490077 22 22 } 23 23 24 public function parse( )24 public function parse( $test = false ) 25 25 { 26 26 $this->properties = array(); // Reset properties in the event we're importing multiple files 27 27 28 if ( $test === false ) 29 { 30 $import_settings = houzez_property_feed_get_import_settings_from_id( $this->import_id ); 31 } 32 else 33 { 34 $import_settings = map_deep( wp_unslash($_POST), 'sanitize_text_field' ); 35 if ( isset( $_POST['xml_url'] ) ) 36 { 37 $import_settings['xml_url'] = sanitize_url( wp_unslash( $_POST['xml_url'] ) ); 38 } 39 } 40 28 41 $this->log("Parsing properties", '', 0, '', false); 29 30 $import_settings = houzez_property_feed_get_import_settings_from_id( $this->import_id );31 42 32 43 $contents = ''; … … 43 54 return false; 44 55 } 56 57 $pro_active = apply_filters( 'houzez_property_feed_pro_active', false ); 45 58 46 59 $xml = simplexml_load_string($contents); … … 88 101 } 89 102 90 if ( empty($this->properties) )103 if ( $test === false && empty($this->properties) ) 91 104 { 92 105 $this->log_error( 'No properties found. We\'re not going to continue as this could likely be wrong and all properties will get removed if we continue.' ); -
houzez-property-feed/trunk/includes/import-functions.php
r3442498 r3490077 707 707 break; 708 708 } 709 case "property_finder_api": 710 { 711 // includes 712 require_once dirname( __FILE__ ) . '/import-formats/class-houzez-property-feed-format-property-finder-api.php'; 713 714 $import_object = new Houzez_Property_Feed_Format_Property_Finder_API( $instance_id, $import_id ); 715 716 break; 717 } 709 718 case "property_finder": 710 719 {
Note: See TracChangeset
for help on using the changeset viewer.