如何在magento中获取商店徽标和图像alt
问题描述:
我想通过商店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。
答
我找到了解决方案。我们可以得到这与下面的代码所有细节是存储在表core_config_data所以你使用这个
$logo_src = Mage::getStoreConfig('design/header/logo_src', $store_id)
$logo_alt = Mage::getStoreConfig('design/header/logo_alt', $store_id)