eCommerce Solutions

searches for parts related to the search term provided and returns part objects.
<!-- PowerSearch -->
<?php
require_once('libraries/happpi/LoadAll.php'); // points to the LoadAll.php file for loading the library.
// once the library is required, you can now use one of the main "interaction" classes.
// These interaction classes contain methods that get information from our REST API and
// converts them to PHP objects for you to use.
$Search = new CurtSearchResult(); // create a new Search Result object to gain access to its functions.
$searchResults = $Search->powerSearch("11000"); // call powerSearch() and pass in the search term. An array of Part Objects are returned.
foreach($searchResults as $part){ // step through each search result
echo $part->getPartID(); // display the partID of each search result.
echo "<br />";
}
?>