gpt4 book ai didi

magento - 如何在 Magento 中使用多个商店 ID 获取商店名称?

转载 作者:行者123 更新时间:2023-12-03 23:15:40 25 4
gpt4 key购买 nike

我想通过在 magento 中使用多个商店 ID 来获取商店名称。喜欢:

<?php $store_ids= array(1,2,3);

现在如何获取这些商店 ID 的商店名称。

最佳答案

// Gets the current store's details  
$store = Mage::app()->getStore();

// Gets the current store's id
$storeId = Mage::app()->getStore()->getStoreId();

// Gets the current store's code $storeCode =
Mage::app()->getStore()->getCode();

// Gets the current website's id
$websiteId = Mage::app()->getStore()->getWebsiteId();

// Gets the current store's group id
$storeGroupId = Mage::app()->getStore()->getGroupId();

// Gets the current store's name
$storeName = Mage::app()->getStore()->getName();

// Gets the current store's sort order
$storeSortOrder = Mage::app()->getStore()->getSortOrder();

// Gets the current store's status
$storeIsActive = Mage::app()->getStore()->getIsActive();

// Gets the current store's locale
$storeLocaleCode = Mage::app()->getStore()->getLocaleCode();

// Gets the current store's home url
$storeHomeUrl = Mage::app()->getStore()->getHomeUrl();

关于magento - 如何在 Magento 中使用多个商店 ID 获取商店名称?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31761516/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com