4D

PRCO

Three easy steps to 4D v11 SQL success on the Web

PRco, Inc. offers Vehicle Service Contracts and GAP waivers for buyers of pre-owned cars. Until recently, a static website and a CRM foundation built on 4D 2004 was their solution for a website and for processing data.

 

PRco made the decision to build an integrated Web-based application that would be fast, interactive and give participating dealerships a Web presence as a value add for being a PRco distributor.

 

The success of PRco's new application was accomplished in three steps that use components and features of 4D v11 SQL: Creating a new dynamic interface, managing the import of daily reports, and implementing a new web server based search engine.

 

Step 1: Converting the static website

The element of a new look-and-feel is combined with search functionality tied to the 4D v11 SQL server. The search function renders results quickly and JavaScript abilities help process photos, videos and Google maps.

 

Step 2: Managing the import and formatting of new data

The transfer of new and current information begins each night when the 4D v11 SQL server requests inventory reports and car data from a third-party service. The data is received in XML format and is automatically imported into 4D. To ensure that this information is optimized for search engine indexing, PRco used 4D v11 SQL's ability to pre-process HTML pages.

 

Step 3: Implementing a search dialog

Visitors start at http://www.prcocars.com where they can search for a car, starting with the make.
The list of car makes is built on the fly by selecting distinct values from the database for all the makes that are being actively advertised on the site. Once a make is selected, another menu for selecting the model of the vehicle is built and displayed using the same technique.


The 4D v11 SQL web server commands allow the sub-drop down menus to automatically re-populate with the current number of models that will show up in the results for that search. Further search refinements can be made based on year, price, and zip code location.


Location specific searches are created using Zip Code Lat/Lon lookups, customized Great Circle Distance calculation methods (adapted from those written by well-known professional Physicist, Ed Williams; http://williams.best.vwh.net/gccalc.htm), and the Google Maps API. All of these technologies were integrated using 4D v11 SQL.

 

This enables site visitors to define their search by geo-oriented criteria. The 4D v11 SQL Web application generates the code Google Maps needs to position and populate the map with the locations of the cars and dealers.

 

Inserting one line of code (a 4DACTION tag that calls a 4D method to act upon a selection of records in the database) replaces the tag within the HTML document with the correct Google Maps API code. When the page is rendered, the location marks appear on the map.

 

Pulling It All Together

4D v11 SQL, 4D Web Server, and integrating components such as JavaScript and the Google Map API technologies created a simple yet elegant and powerful website solution for PRco USA.

 

“Of course one of the biggest factors in building this new version of the PRco website with 4D v11 SQL was the speed at which all this information can be processed. The familiar development interface in 4D v11 SQL and integrated 4D Web Commands are well thought out and easy to use,” said Randy Shepherd, Director of Business Systems for PRco USA.

 

“Adding HTML and JavaScript into our application was a simple and straight-forward process for Edmundo Orozco, our in-house web development and JavaScript expert,” continued Shepherd. “And he is a complete novice when it comes to 4D development!”

 

“To sum it up, I've been a 4D Developer for over 15 years and was pretty stoked about building this website in 4D v11 SQL because it provides us with a solid framework to build upon for creating our new password-protected Partners web site. We will be able to easily interface with our internal 4D Server application and address any of the data integration challenges that they can throw our way using 4D v11 SQL, SQL, XML, and Web Services. We are very happy with how 4D has helped PRco grow to become a leader in this service industry.”