2014-12-08 41 views
1

我想通過商店id獲取商店的徽標和徽標alt標籤和主頁URL。我使用下面的代碼,但它不適合我。如何在magento中獲取商店徽標和圖像alt

  $storeid=1; 

      $store['id']=$collections->getStore_id(); 
      $store['image']=Mage::app()->getStore($storeid)->getLogoSrc(); 
      $store['alt']=Mage::app()->getStore($storeid)->getLogoAlt(); 
      $store['storeurl']=Mage::app()->getStore($storeid)->getHomeUrl(); 

在回報我得到

  [id] => 1 
      [name] => Default Store View 
      [image] => 
      [alt] => 
      [storeurl] => 

讓我知道我做錯了或如何從商店ID商店商品的標誌和標識ALT標記和網頁URL。

回答

2

我找到了解決方案。我們可以得到這與下面的代碼所有細節是存儲在表core_config_data所以你使用這個

$logo_src = Mage::getStoreConfig('design/header/logo_src', $store_id) 


    $logo_alt = Mage::getStoreConfig('design/header/logo_alt', $store_id)