【问题标题】:Get store name in magento using php使用php在magento中获取商店名称
【发布时间】:2012-11-16 14:18:49
【问题描述】:

如何使用 php 在 magento 中获取商店名称?

例如:

我在 magento 有两家商店:

domain.com/store/jp
domain.com/store/en

如何使用 php 获取商店名称?你能给我返回商店名称的php代码行吗? jpen

【问题讨论】:

标签: php magento


【解决方案1】:

只是分享我的发现:

获取商店数据

Mage::app()->getStore();

商店主页网址

Mage::app()->getStore()->getHomeUrl();

商店代码

Mage::app()->getStore()->getCode();

有效

Mage::app()->getStore()->getIsActive();

网站 ID

Mage::app()->getStore()->getWebsiteId();

商店名称

Mage::app()->getStore()->getName();

商店 ID

Mage::app()->getStore()->getStoreId();

© 来源:how to get store information in Magento?@@chapagain

【讨论】:

    【解决方案2】:

    这是一个商店代码,您可以通过以下方式获取:

    $code = Mage::app()->getStore()->getCode();
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-01-30
      • 2011-02-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多