コード例 #1
0
ファイル: index.php プロジェクト: ninnemana/CURT-Happpi-Test
     }
     echo "</ul>";
     foreach ($part->getImages() as $image) {
         if ($image->getSize() == "Tall") {
             echo '<img src="' . $image->getPath() . '" width="75" />';
         }
     }
     echo "<br />";
     echo "<hr />";
 }
 echo "<hr />";
 echo "<hr />";
 echo "<hr />";
 foreach ($searchResult as $result) {
     $part = new happpi\Part();
     $part->setPartID($result->getPartID());
     $part = $part->getPart();
     echo '<a href="part.php?partID=' . $part->getPartID() . '">';
     echo "<h2>" . $part->getShortDesc() . "</h2>";
     echo "</a>";
     echo '<img src="' . $part->getPartImage("a", "Grande") . '" width="150" />';
     echo "<span style='color:orange; font-size:25px;' >Price:</span>" . $part->getListPrice() . "";
     echo "<h3>Product Specifications</h3>";
     echo "<ul>";
     foreach ($part->getAttributes() as $attr) {
         echo "<li>" . $attr->getKey() . ": <strong>" . $attr->getValue() . "</strong></li>";
     }
     echo "</ul>";
     echo "<h3>For your Vehicle Specifications</h3>";
     echo "<ul>";
     foreach ($part->getVehicleAttributes() as $vAttr) {
コード例 #2
0
ファイル: part.php プロジェクト: ninnemana/CURT-Happpi-Test
<?php

require_once 'libraries/happpi/LoadAll.php';
if (isset($_GET['partID'])) {
    $Part = new happpi\Part();
    $Part->setPartID($_GET['partID']);
    $Part = $Part->getPart();
    // breadcrumbs for parts
    $cat = $Part->getPartCategories()[0];
    $numItems = count($Part->getPartBreadCrumbs());
    $i = 0;
    foreach ($Part->getPartBreadCrumbs($cat->getCatID()) as $partBreadCrumb) {
        $i += 1;
        if ($numItems == 1) {
            echo '<a href="category.php?catID=' . $partBreadCrumb->getCatID() . '">';
            echo $catBreadCrumb->getCatTitle();
            echo "</a>";
        } elseif ($numItems > 1) {
            echo '<a href="category.php?catID=' . $partBreadCrumb->getCatID() . '">';
            echo $partBreadCrumb->getCatTitle();
            echo "</a>";
            echo " > ";
        }
    }
    echo $Part->getShortDesc();
    echo "<br />";
    if (isset($_COOKIE["vehicleID"])) {
        $Vehicle = new happpi\Vehicle();
        $Vehicle->setYear($_COOKIE["vehicle_year"]);
        $Vehicle->setMake($_COOKIE["vehicle_make"]);
        $Vehicle->setModel($_COOKIE["vehicle_model"]);