eCommerce Solutions

Retrieves the categories for that part.
<!-- getPartCategories() -->
<?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.
$Part->setPartID(11000); // set the required dependency of partID so that we can get all the categories for it.
$partsCategories = $Part->getPartCategories(); // call the getPartCategories() method to retreive all the APICategory objects in contains.
echo "<h2>Part 11000's Categories</h2>";
foreach($partsCategories as $APICategoryObj){ // step through the list of APICategory objects
echo $APICategoryObj->getCatTitle(); // use the getter to access the APICategory's CatTitle property.
echo "<br />";
}
?>