コード例 #1
1
ファイル: Header.php プロジェクト: booklein/bookle
 public function _construct()
 {
     if (!Mage::helper('ves_tempcp/theme')->isVenusTheme()) {
         parent::_construct();
     } else {
         /*Check framework was loaded*/
         $helper = Mage::helper("ves_tempcp/framework")->getFramework();
         if (!$helper || !is_object($helper)) {
             $packageName = Mage::getSingleton('core/design_package')->getPackageName();
             if (!$packageName) {
                 $packageName = "default";
             }
             $themeName = Mage::getDesign()->getTheme('frontend');
             $themeName = $packageName . "/" . $themeName;
             $themeConfig = Mage::helper('ves_tempcp/theme')->getCurrentTheme();
             $helper = Mage::helper("ves_tempcp/framework")->initFramework($themeName, $themeConfig);
         } else {
             $themeConfig = $helper->getConfig();
         }
         /*get header layout*/
         $header_layout = $helper->getParam("header_layout", $themeConfig->get("header_layout"));
         $header_template = 'page/html/header.phtml';
         /*check header layout file is exists*/
         if ($header_layout) {
             if ($header_file_path = Mage::helper("ves_tempcp/framework")->getLayoutPath("header/" . $header_layout . ".phtml", "header/default.phtml")) {
                 $header_template = 'common/header/' . $header_layout . '.phtml';
             }
         }
         $this->setTemplate($header_template);
         if ($themeConfig->get("use_customlogo", 0) && ($logoSrc = $themeConfig->get("custom_logo", ""))) {
             if ($logoSrc != "images/") {
                 $logoAlt = $themeConfig->get("logo_alt", "");
                 $this->setLogo($logoSrc, $logoAlt);
             }
         }
         if ($themeConfig->get("use_customlogo", 0) && ($logoSmallSrc = $themeConfig->get("custom_logo_small", ""))) {
             if ($logoSmallSrc != "images/") {
                 $this->setLogoSmall($logoSmallSrc);
             }
         }
     }
 }
コード例 #2
0
ファイル: Header.php プロジェクト: ramantalkin/tmp01skin
 public function _construct()
 {
     $header = Mage::getStoreConfig('mgs_theme/general/header');
     if ($header != '' && Mage::getStoreConfig('mpanel/general/enabled')) {
         $helper = Mage::helper('mpanel');
         if ($helper->acceptToUsePanel()) {
             $this->setTemplate('page/html/header/admin/' . $header . '.phtml');
         } else {
             $this->setTemplate('page/html/header/' . $header . '.phtml');
         }
     } else {
         parent::_construct();
     }
 }
コード例 #3
0
ファイル: Header.php プロジェクト: adrienManikon/iPong
 public function _construct()
 {
     $ves_theme = Mage::helper('themesettings/theme');
     $store = Mage::app()->getStore();
     $package_name = Mage::getSingleton('core/design_package')->getPackageName();
     $theme = Mage::getSingleton('core/design_package')->getTheme('template');
     $isVenusTheme = $ves_theme->isVenusTheme($package_name, $theme);
     if ($isVenusTheme) {
         $header_template = Mage::helper('themesettings')->getConfig('header/layout');
         $header_template = 'common' . DS . 'header' . DS . $header_template . '.phtml';
         $this->setTemplate($header_template);
     } else {
         parent::_construct();
     }
 }
コード例 #4
0
 public function getWelcome()
 {
     return Mage::helper('ewpagecache')->getBeginMarker(self::KEY) . parent::getWelcome() . Mage::helper('ewpagecache')->getEndMarker(self::KEY);
 }
コード例 #5
0
ファイル: Header.php プロジェクト: kozinthetdbp/shopmyar
 public function _construct()
 {
     parent::_construct();
     $this->addData(array('cache_lifetime' => 0));
 }
コード例 #6
0
 public function getLogoAndCurrencyAction()
 {
     $post_data = Mage::app()->getRequest()->getParams();
     $storeId = $post_data['storeid'];
     $block = new Mage_Page_Block_Html_Header();
     $logo = $block->getLogoSrc();
     $currency_code = Mage::getModel('core/store')->load($storeId)->getCurrentCurrencyCode();
     $isPos = 0;
     $resultArr = array('logo' => $logo, 'currency_symbol' => Mage::app()->getLocale()->currency($currency_code)->getSymbol(), 'is_pos' => $isPos);
     $result = Mage::helper('core')->jsonEncode($resultArr);
     return Mage::app()->getResponse()->setBody($result);
 }