Contact your MLS provider to acquire your appropriate RETS credentials. Most major realty corporations include this access to their registered agents through their managing brokers.
With so many listings on the market now, it’s nearly impossible to share online real estate listings with clients. Most MLS systems are great for searching and sorting, but are too cumbersome for clients to use on their own. Fortunately, we can use Drupal 7 and a module called DRealty to import listings to our own websites, and present a more refined list of properties for clients to sort through. Unlike WordPress plugins, which show frames from MLS services, Drupal allows us to list the properties on our own websites, which is great for SEO, site performance, and display control.
Looking at past tutorials, we found the setup instructions for Drupal 7 + DRealty to be hard to follow and incomplete. Please comment on this tutorial, whether you’re able to use it as-is or if you find discrepancies, and let us know about your experience.
Ensure the newest version of Drupal is installed (7.32 as of 11/5/14)
Required Modules: Entity API (enabled), Libraries (enabled), System (enabled)
Required Libraries: phRets library, the newest version
Install the dRealty module on Drupal
Log-in to the RETS database
Set up the Drealtor module to log-in to your RETS database.
- Enable connection
If you see this error, confirm your log-in information with your RETS provider.
Successful connection message:
- Go to configure listings
- Select a listing class that you want to import from the RETS system. For example, Residential Property
- Check the box under Enabled next to your chosen listing class
- Select an option under Lifetime to enable automatic imports
- Click configure to set up the query
- The Required Fields
The Required Fields must be filled with RETS metadata terms which can be found by using RETSMD. The terms might be different based on your RETS provider
- Id Field-Must be an ID field for the RETS system. For Properties it is usually the MLS ID or Listing ID. However, in some RETS systems it can be listed out like LN-MLS.
- Key Field- The key field is defined by the RETS provider, it can be the same as the ID Field, but some providers have a separate field.
- Status Field-The RETS MLS status field, it will be listed in RETSMD.
- Drealty Property Type-Additional property types can be created to maintain multiple queries.
- RETS Import Options
- Query Type- choose a query type you want to set up.
- Default query type- you must select a status field
- Offset Not Supported (Query based on price field)-Sets the offset based on the Price field. This setting needs a DMQL query. The price field must be set with a price listing. Amount of the Offset and the Maximum offset amount must be set by using the drop down boxes.
- Offset Not Supported (Query based on RETS Key)-Set the offset based on the RETS Key, you must select the amount of records that are processed at a time.
- Manually supplied Query (Server must support offset)-You must provide a DMQL query and the amount of records to be provided.
- Query to use — this is the most important tool in the process. this defines the records you’re going to pull. Make sure you explain how this query will batch results and give a few example queries and what they mean: (ZP = 60302*) will return all residential properties in zip code 60302, (LIST_22=1000+) will return all residential properties with a list price of $1,000 or greater -Select the query type. Any MLS field type can be used. It’s important to use the supplied tutorial because the search will fail if there are any errors.
- Price field to base the offset on-
- The amount to offset by.-
For more information on query follow this tutorial
- The maximum offset amount.-
- To import photos, you must click the checkbox.
- Photo Modification Timestamp Field-To get the photo Timestamp, you have to look what your RETS system declares as the picture Date. This Field type will be a Date type.
- Object types to download-Select the type of photos you want to import
- Image Field-select the image field you want to import to
- Image Chunk Size-Select the size of photo data chunks you want to be processed at a time. Smaller chunk sizes use less system memory, but take longer to process. Larger chunk sizes process faster, but use more memory, and may cause memory errors.
- Mark Listings
- Mark all listings for update?-Check the box if you want to force reset the lifetime clock to zero.
- Click Save Configuration to save your configuration
- Drealty Property Types.
- Create a listing if you haven’t already
- Add a Tags label with the Field Type Term Reference and Widget type Autocomplete term widget (tagging)
- Add an image field if you want one or haven’t added one already
- Add any other fields you want to import from RETS and display on your Drupal site
- Click Save to save your listing
- Importing RETS listing
- Log into bash on your server
- Install drush to your Drupal system.
- Check on your Drupal status with drush command: drush status
- Run cron via drush with drush command: drush cron
- Clear cache via drush with drush command: drush cc all
- To import the listing from RETS use this drush command: drush -u admin -d rets-import
- To flush the RETS system, you can use this command drush -u admin -d rets-flush
- Wait until the system has finished importing your listings from RETS
Importing listings can take a significant amount of time
- Go to find content on your Drupal site
- In content go to Drealty Listings and you’ll see all the imported listings
- Click on one the imported listings and look at all the fields you have imported from RETS