             } else {
                 autocompleteTableView.isHidden = false
             }
-        }
-    }
+            updateSortFilterHiddentState()
+        }
+    }
+
     var searchTerm = "" {
         didSet {
             if searchTerm.isEmpty {
                 products.removeAll()
                 autocompleteSuggestions.removeAll()
+                pageCount = 0
             }
             else {
                 searchBar.text = searchTerm
-            }
-        }
+                searchProductsView.isHidden = true
+            }
+        }
+    }
+
+    func updateSortFilterHiddentState() {
+        sortFilterView.isHidden = products.isEmpty || autocompleteTableView.isHidden == false
+    }
+
+    func updateSearchProductsView() {
+        searchProductsView.isHidden = !products.isEmpty
+        searchProductsLabel.text = searchTerm.isEmpty ? "Search Products" : "No Results"
+        searchProductsImageView.image = UIImage(named: searchTerm.isEmpty ? "img-search.pdf" : "img-noresults.pdf")
     }
 }
 

        }

        RCHSDK.defaultClient().sendRequest(searchBuilder.build(), success: { (responseObject) in
            
            guard let searchResult = responseObject as? RCHSearchResult else {
                return
            }
            
            self.products = searchResult.products!
            self.searchFacets = searchResult.facets!
            

        view.endEditing(true)
        autocompleteSuggestions.removeAll()
        sortButton.setTitle("Sort", for: .normal)
        updateSearchProductsView()
    }
    
    // MARK: API
