• Resolved dmitryosipchuk

    (@dmitryosipchuk)


    Hi there,

    I was hoping you could help me we are developing a site for our client using the propertyhive plugin (which is great by the way!) however when we import from the Rezi API we are missing the Main Marketing Text information. The Summary Property Description & Room Descriptions are pulled in fine.

    Is there any way to alter the import function to include the Marketing Text as well?

    Thanks in advance, Dmitry.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter dmitryosipchuk

    (@dmitryosipchuk)

    SOLVED!

    After some more searching and testing and hair pulling, I found a way to remap some of the fields on import from Rezi, our solution is below just in case anyone else has this/similar issue.

    // Rename post name with property ref
    add_action('propertyhive_property_imported_dezrez_json', 'append_postcode_to_display_address', 10, 2);
    function append_postcode_to_display_address($post_id, $property)
    {
        $newDescription = '';
        foreach ($property['Descriptions'] as $description) {
            // Room Counts
            if ($description['Name'] == 'Main Marketing') {
                $newDescription = $description['Text'];
            }
        }
    
        $my_post = array(
            'ID' => $post_id,
            'post_name' => $property['RoleId'],
            'post_content' => $newDescription,
        );
    
        // Update the post into the database
        $post_id = wp_update_post($my_post);
    }

    Hi,
    How did you manage to get DezRez feed? I get error
    Failed to parse JSON file. Possibly invalid JSON

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Dezrez Rezi API Field Mapping’ is closed to new replies.