echo "<li>" . $vAttr->getKey() . ": <strong>" . $vAttr->getValue() . "</strong></li>"; } echo "</ul>"; foreach ($part->getImages() as $image) { if ($image->getSize() == "Tall") { echo '<img src="' . $image->getPath() . '" width="75" />'; } } echo "<br />"; echo "<hr />"; } } // category block // timing out ocasionally //echo "Your vehicle: " . $Vehicle->getVehicle()->getYear() . " " . $Vehicle->getVehicle()->getMake() . " " . $Vehicle->getVehicle()->getModel() . " " . $Vehicle->getVehicle()->getStyle(); $Category = new happpi\Category(); echo "<hr />"; echo "<h1>Categories</h1>"; echo "<hr />"; foreach ($Category->getParentCategories() as $parentCat) { echo '<a href="category.php?catID=' . $parentCat->getCatID() . '">'; echo '<img src="' . $parentCat->getImage() . '" title="' . $parentCat->getCatTitle() . '" width="100" />'; echo '</a>'; } // latest parts block echo "<h1>Latest Parts</h1>"; $LatestParts = new happpi\Part(); foreach ($LatestParts->getLatestParts() as $lp) { echo "<hr />"; echo '<a href="part.php?partID=' . $lp->getPartID() . '">'; echo "<h2>" . $lp->getShortDesc() . "</h2>";
<?php require_once 'libraries/happpi/LoadAll.php'; if (isset($_GET['catID']) && $_GET['catID'] != "") { $Category = new happpi\Category(); $Category->setCatID($_GET['catID']); $cat = $Category->getCategory(); //cat ID is passed to the page and do the lookup $numItems = count($Category->getCategoryBreadcrumbs()); $i = 0; foreach ($Category->getCategoryBreadcrumbs() as $catBreadCrumb) { $i += 1; if ($numItems == 1) { echo '<a href="category.php?catID=' . $catBreadCrumb->getCatID() . '">'; echo $catBreadCrumb->getCatTitle(); echo "</a>"; } elseif ($numItems > 1 && $i != $numItems) { echo '<a href="category.php?catID=' . $catBreadCrumb->getCatID() . '">'; echo $catBreadCrumb->getCatTitle(); echo "</a>"; echo " > "; } else { if ($i == $numItems) { echo $catBreadCrumb->getCatTitle(); } } } // end of foreach echo "<br />"; // get vehicle info from cookie values (year, make, model, style) if (isset($_COOKIE["vehicleID"])) {
$catID = $_GET['lifestyle']; $category = new happpi\Category(); $lifestyle = $category->getLifestyle($catID); echo '<a href="lifestyle.php">Lifestyles</a> > '; echo $lifestyle->getCatTitle(); echo "<br />"; echo "<hr />"; //echo '<img src="' . . '" />'; echo "<h1>" . $lifestyle->getCatTitle() . "</h1>"; echo $lifestyle->getContent()[1]->getContent(); $towableList = $lifestyle->getTowables(); foreach ($towableList as $trailer) { echo '<img src="' . $trailer->getImage() . '" height="100" />'; echo "<br />"; echo $trailer->getName(); echo "<br />"; echo "<br />"; } } // end isset lifestyle echo "<h1>Products to fit your Lifestyle</h1>"; $category = new happpi\Category(); foreach ($category->getLifestyles() as $Lifestyle) { echo '<div style="width:500px;clear:both;padding-bottom: 10px;">'; echo '<a href="Lifestyle.php?lifestyle=' . $Lifestyle->getCatID() . '">'; echo '<img src="' . $Lifestyle->getImage() . '" style="float:left;padding-right:10px;" />'; echo "<h2>" . $Lifestyle->getCatTitle() . "</h2>"; echo "</a>"; echo $Lifestyle->getShortDesc(); echo "</div>"; }