You can save the search terms in the session on top of the page:
<?php
@session_start();
if (isset($_GET['shopSearchInput'])) {
$_SESSION["shopSearchInput"] = $_GET['shopSearchInput'];
}
?>
Then display it where you want to from the session.
I think you can get it to use AND for any space by defining space as the and on line 16 like:
$searchProducts_1->setSearch(array("type"=>"k","comparison"=>"like", "and"=>" ") ...
I think the easiest way to get it to not return results with a blank search would be to add a search param that returned no results below the current search like:
<?php
if ((isset($_GET["shopSearchInput"])) && ($_GET["shopSearchInput"] === "")) {
$searchProducts_1->clearSearch();
$searchProducts_1->setSearch(array("type"=>"v","comparison"=>"="), array("ProductSKU"), "s", "0");
}
?>
That should only return rows with the SKU is = 0, which I assume would be no results.