protected function snippet($product_id) { // begin fitment fitment notes $noteFinder = new Elite_Vafnote_Model_Finder(); $vehicle = Elite_Vaf_Helper_Data::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 }
function notes() { $finder = new Elite_Vafnote_Model_Finder(); return $finder->getNotes(); }