eCommerce Solutions

Retrieves a list of styles given a specific model
<?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.
$vehicle = new CurtVehicle(); // create new vehicle object to gain access to its functions.
$vehicle->setMount("rear"); // set optional "dependency" of mount.
$vehicle->setYear(2010); // set dependency of year.
$vehicle->setMake("Ford"); // set dependency of make.
$vehicle->setModel("F-150"); // set dependency of model.
$styles = $vehicle->getStyles(); // call getStyles which returns a list of styles (strings)
echo "<h2>The list of models for rear mount, 2010, Ford, F-150</h2>";
foreach($styles as $style){ // step through the list of styles.
echo $style;
echo "<br />";
}
?>