code: public void addAllToCart()
      {
          for (Product item : searchResults) {
              Boolean selected = searchSelections.get(item);
              if (selected != null && selected) {
                  searchSelections.put(item, false);
                  cart.addProduct(item, 1);
              }
          }
      }
docs: Add many items to cart