00001 <?php 00002 00003 class Mage_Checkout_Block_Agreements extends Mage_Core_Block_Template 00004 { 00005 public function getAgreements() 00006 { 00007 if (!$this->hasAgreements()) { 00008 if (!Mage::getStoreConfigFlag('checkout/options/enable_agreements')) { 00009 $agreements = array(); 00010 } else { 00011 $agreements = Mage::getModel('checkout/agreement')->getCollection() 00012 ->addStoreFilter(Mage::app()->getStore()->getId()) 00013 ->addFieldToFilter('is_active', 1); 00014 } 00015 $this->setAgreements($agreements); 00016 } 00017 return $this->getData('agreements'); 00018 } 00019 }