eCommerce Solutions

Returns the parent categories.
<!-- getParentCategories() -->
<?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.
$Category = new CurtCategory(); // create a new category object to gain access to its functions.
$parentCategories = $Category->getParentCategories(); // call getParentCategories() to get an array of CurtCategory objects
echo "<h2>Parent Categories:</h2>";
foreach($parentCategories as $parentCat){ // step through the list of category objects
echo $parentCat->getCatTitle(); // display the title of each parent category by using the getter to access the property catTitle.
echo "<br />";
}
?>