Investigate: myWindermere Agent on Listing Detail

Logging into myWindermere should replace listing agent with your chosen agent on Detail pages

Start Date: February 28, 2011
Deadline:  
Assigned by: Carolyn

Also an issue with the AEN - Automatic Email Notification that user get from saved searches. The links in the e-mail go to Detail pages. They should show the associated agent.

example link: http://www.windermere.com/index.cfm?fuseaction=Listing.ListingDetail&searchID= 625756505c5a534559575860415e57515b5958595b5f35490a545b5356440f&ListingID=129434740

 
/Controllers/Listing/fbx_Switch.cfm

Case ListingDetail

<cfif request.page.skin eq "PublicSiteLayout">
    <cflocation url="index.cfm?fuseaction=Listing.ListingDetailUpdated&listingID=#attributes.ListingID#">
</cfif>

QUESTION: what is the skin of the detail tab vs. the detail page?

3/1/11From the Detail Tab
  • <cfif trim(selPub_View.username) NEQ "nwmls">
        <h2 id="ContactAgent">Contact Agent / Schedule Showing</h2>
    </cfif>
    <div class="AgentInfo">
        #agentInfo#
    </div>
    <cfset variables.mls = CreateObject( 'component', '/W/CFC/persist/MLS' )>
    <cfset variables.mls.new( #selPub_View.mls# )>
    <cfif trim(selPub_View.username) EQ "nwmls">
        <p>#variables.mls.displayMLSCredit( selPub_View.other_company )#</p>
    </cfif>

IN THE SWITCH

    • attributes.XFA.EmailFriend =Listing.ListingEmailPP
    • attributes.XFA.EmailAgent = Listing.ListingEmailAgentPP
    • attributes.XFA.addFavorite = account.actAddFavorite
    • attributes.XFA.EmailNoAgent = Listing.ListingEmailNoAgent
    • attributes.XFA.LookupAgent = agentOffice.LookupAgentResultsListingPP
    • agentOffice.agentContactDetailPP into agentInfo
      • <cfif selPub_view.username EQ "nwmls">
            <cfset AddToQ('vAgentOffice.ContactAgent INTO agentInfo')>
            (This is the lookup form)
        <cfelse>
            <cfset attributes.agentMetaUser_ID = selPub_view.metauser_id>
            <cfset AddToQ('mUser.getAgent')>
            <cfset AddToQ('vAgentOffice.AgentContactDetailPP INTO agentInfo')>
        </cfif>

mUser.getAgent

  • <cfparam name="attributes.agentMetaUser_ID" default="0">
    <cfparam name="attributes.metaUser_ID" default="#attributes.agentMetaUser_ID#">
    <cfset AddToQ('Q.selMetaUserRosterAgency')>

selMetaUserRosterAgency'

 

3/1/11From the Detail Page
  • <cfset variables.mls = CreateObject( 'component', '/W/CFC/persist/MLS' )>
    <cfset variables.mls.new( #selPub_View.mls# )>
    <div id="agent-info" style="background-color: ##f5f5f5; border: 1px solid ##f5f5f5;">
        <cfif trim(selPub_View.username) EQ "nwmls">
            <p>#variables.mls.displayMLSCredit( selPub_View.other_company )#</p>
            <p>#contactAgent#</p>
            <p><strong>No Agent?</strong> <a id="referralLink" onclick="populateFormToDiv('referral');" href="javascript: voidhref();">Request more information</a> if you are not currently working with a Windermere agent.</p>
        <cfelse>
            <cfif isDefinedValue("selMetaUserRosterAgency")>
                <cfloop query="selMetaUserRosterAgency">
                    <div style="float: right;">
                        <cf_getAgentPhoto border="1" height="100" f_name="#selMetaUserRosterAgency.firstName#" l_name="#selMetaUserRosterAgency.lastName#" AgentHasGif="#selMetaUserRosterAgency.HasGif#" agentid="#selMetaUserRosterAgency.RosterID#" agentimagetype="#selMetaUserRosterAgency.AgentImageType#" bgcolor="f5f5f5">
                    </div>
                    <div style="float: left;">
                        <span class="agentName"><strong>#selMetaUserRosterAgency.firstName# #selMetaUserRosterAgency.lastName#</strong></span><br />
                        <span class="officeInfo">
                        #selMetaUserRosterAgency.LicensedName#<br />
                        Office Phone: #selMetaUserRosterAgency.OfficePhone#<br />
                        Direct Phone: #selMetaUserRosterAgency.CellPhone#<br />
                        <a href="mailto:#selMetaUserRosterAgency.email#" id="agent_email" onClick="LHTracking(this.id);">#selMetaUserRosterAgency.email#</a><br />
                        </span>
                    </div>
                </cfloop>
            </cfif>
        </cfif>
    </div>

IN THE SWITCH

    • attributes.XFA.LookupAgent = agentOffice.LookupAgentResultsListingPP
    • vAgentOffice.ContactAgent into contactAgent
      • (This is the lookup form)
    • listing.setListingAgents
3/1/11In The Database

Table: metauser

  metauser_id metauser_type_id first_name last_name permissions username agentMetauser_id
  54687 1 Jeff Green 4 jeffgreen  
  384200 1 Stephen Lloyd 1534 s_lloyd  
  384201 3 Stephen Lloyd 512 slloyd16149 54687

(Checked In 3/--/11) Revision # -----
Modified Files

Detail Page

/xxx

 


Stephen Lloyd 03/02/2011