diff --git a/src/assets/js/simply-rets-client.js b/src/assets/js/simply-rets-client.js index 6ac5671..232b4dd 100644 --- a/src/assets/js/simply-rets-client.js +++ b/src/assets/js/simply-rets-client.js @@ -336,6 +336,8 @@ function normalizeParameters(params) { return obj.maxGarageSpaces = params[key] if (key === "salesagent") return obj.salesAgent = params[key] + if (key === "salesoffice") + return obj.salesOffice = params[key] if (key === "speciallistingconditions") return obj.specialListingConditions = params[key] diff --git a/src/simply-rets-post-pages.php b/src/simply-rets-post-pages.php index 9180386..1b52a22 100644 --- a/src/simply-rets-post-pages.php +++ b/src/simply-rets-post-pages.php @@ -186,6 +186,7 @@ public static function srQueryVarsInit( $vars ) { $vars[] = "sr_areaMinor"; $vars[] = "sr_ownership"; $vars[] = "sr_salesAgent"; + $vars[] = "sr_salesOffice"; $vars[] = "sr_agent"; $vars[] = "sr_brokers"; $vars[] = "sr_sort"; @@ -814,6 +815,16 @@ public static function srPostDefaultContent( $content ) { $salesAgent_att = $salesAgentData["att"]; $salesAgent_query = $salesAgentData["query"]; + /** Parse multiple salesOffice's from short-code parameter */ + $salesOfficeData = SimplyRetsCustomPostPages::parseGetParameter( + "sr_salesOffice", + "salesOffice", + $_GET + ); + + $salesOffice_att = $salesOfficeData["att"]; + $salesOffice_query = $salesOfficeData["query"]; + /** Parse multiple cities from short-code parameter */ $citiesData = SimplyRetsCustomPostPages::parseGetParameter( "sr_cities", @@ -969,6 +980,7 @@ public static function srPostDefaultContent( $content ) { "areaMinor" => $areaMinor_att, "ownership" => $ownership_att, "salesAgent" => $salesAgent_att, + "salesOffice" => $salesOffice_att, "agent" => $agent_att, "brokers" => $brokers_att, "style" => $style_att, @@ -1008,6 +1020,7 @@ public static function srPostDefaultContent( $content ) { . $areaMinor_query . $ownership_query . $salesAgent_query + . $salesOffice_query . $statuses_string . $amenities_string . $exteriorFeatures_query diff --git a/src/simply-rets-shortcode.php b/src/simply-rets-shortcode.php index 0f2a22a..794aff2 100644 --- a/src/simply-rets-shortcode.php +++ b/src/simply-rets-shortcode.php @@ -206,6 +206,7 @@ public static function attributeNameToParameter($name) { "mingaragespaces" => "minGarageSpaces", "maxgaragespaces" => "maxGarageSpaces", "salesagent" => "salesAgent", + "salesoffice" => "salesOffice", "subtypetext" => "subTypeText", "speciallistingconditions" => "specialListingConditions", "areaminor" => "areaMinor" @@ -332,6 +333,7 @@ public static function sr_search_form_shortcode( $atts ) { $areaMinor = isset($atts['areaminor']) ? $atts['areaminor'] : ''; $ownership = isset($atts['ownership']) ? $atts['ownership'] : ''; $salesAgent = isset($atts['salesagent']) ? $atts['salesagent'] : ''; + $salesOffice = isset($atts['salesoffice']) ? $atts['salesoffice'] : ''; if($config_type === '') { $config_type = isset($_GET['sr_ptype']) ? $_GET['sr_ptype'] : ''; @@ -586,6 +588,7 @@ public static function sr_search_form_shortcode( $atts ) { +
@@ -692,6 +695,7 @@ public static function sr_search_form_shortcode( $atts ) { +