コード例 #1
0
 public function fetchView($fileName)
 {
     // This is so we do not need to keep templates
     // outside of the extension code.
     $class_parts = explode("_", __CLASS__);
     $dev_template_path = Mage::getModuleDir('', $class_parts[0] . "_" . $class_parts[1]) . DS . "templates";
     if (Mage::getIsDeveloperMode() && file_exists($dev_template_path . DS . $fileName)) {
         Mage::log("NOTE: Loading template from development path - not the design directory");
         $this->setScriptPath($dev_template_path);
     } else {
         $this->setScriptPath(Mage::getBaseDir('design'));
     }
     return parent::fetchView($fileName);
 }