Exemplo n.º 1
0
 function notes()
 {
     $finder = new VF_Note_Finder();
     return $finder->getNotes();
 }
 protected function snippet($product_id)
 {
     // begin fitment fitment notes
     $noteFinder = new VF_Note_Finder();
     $vehicle = VF_Singleton::getInstance()->vehicleSelection()->getFirstVehicle();
     $product = new Elite_Vaf_Model_Catalog_Product();
     $product->setId($product_id);
     if (null == $vehicle) {
         echo 'Select a vehicle to view fitment notes';
     } else {
         if ($product->isUniversal()) {
             echo 'Product is universal and has no fitment notes';
         } else {
             $mapping_id = $product->getMappingId($vehicle);
             $notes = $noteFinder->getNotes($mapping_id);
             foreach ($notes as $note) {
                 echo $note->message . ' <br />';
             }
             if (!count($notes)) {
                 echo 'There are no notes for your vehicle (' . $vehicle->__toString() . ')';
             }
         }
     }
     // end fitment fitment notes
 }