eCommerce Solutions

Returns CURT's latest parts.
<!-- getLatestParts() -->
<?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.
$Part = new CurtPart(); // create new part object to gain access to its functions.
$latestParts = $Part->getLatestParts(); // call getLatestParts to get the latest parts.
echo "<h2>Latest Parts</h2>";
foreach($latestParts as $partObj){ // step through the list of part objects
echo $partObj->getShortDesc(); // display the short description of each part object.
echo "<br />";
}
?>