eCommerce Solutions

Returns a category given a specific name.
<!-- getCategoryByName() -->
<?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.
$Category = $Category->getCategoryByName("Hitches"); // returns a FullCategory object
echo "<h2>Get Category By name: 'Hitches'</h2>";
// CurtFullCategory Object contains 3 child objects (parent, content, sub_categories).
// step down into the child object named "parent" and
// use the getter to get the value for the shortDesc Property.
echo "<strong>Short Description: </strong>" . $Category->getParent()->getShortDesc();
?>