Skip to main content
added 21 characters in body
Source Link
Msquare
  • 9.3k
  • 7
  • 27
  • 68
protected $_storeManager;

public function __construct(
    ......................
    \Magento\Store\Model\StoreManagerInterface $storeManager,
    ....................
) {
    ....................
    $this->_storeManager = $storeManager;
    ...................
}   
public function execute()
{
    // get Currrent  store id
    $store = $this->_storeManager->getStore()->getId();
    $store_name = '';
    // get Current Store Name
    $stores_list = $this->_storeManager->getStores(true, true);
    foreach ($stores_list as $storekey => $storevalue) {
        if ($store == $storevalue->getId()) {
            $store_name = $storevalue->getName();
        }
    }
    echo "Store Name".$store_name;
}

you can also get all Details of Store

I Hope This Helps You.

protected $_storeManager;

public function __construct(
    ......................
    \Magento\Store\Model\StoreManagerInterface $storeManager,
    ....................
) {
    ....................
    $this->_storeManager = $storeManager;
    ...................
}   
public function execute()
{
    // get Currrent  store id
    $store = $this->_storeManager->getStore()->getId();

    // get Current Store Name
    $stores_list = $this->_storeManager->getStores(true, true);
    foreach ($stores_list as $storekey => $storevalue) {
        if ($store == $storevalue->getId()) {
            $store_name = $storevalue->getName();
        }
    }
    echo "Store Name".$store_name;
}

you can also get all Details of Store

I Hope This Helps You.

protected $_storeManager;

public function __construct(
    ......................
    \Magento\Store\Model\StoreManagerInterface $storeManager,
    ....................
) {
    ....................
    $this->_storeManager = $storeManager;
    ...................
}   
public function execute()
{
    // get Currrent  store id
    $store = $this->_storeManager->getStore()->getId();
    $store_name = '';
    // get Current Store Name
    $stores_list = $this->_storeManager->getStores(true, true);
    foreach ($stores_list as $storekey => $storevalue) {
        if ($store == $storevalue->getId()) {
            $store_name = $storevalue->getName();
        }
    }
    echo "Store Name".$store_name;
}

you can also get all Details of Store

I Hope This Helps You.

deleted 110 characters in body
Source Link
Msquare
  • 9.3k
  • 7
  • 27
  • 68
protected $_storeManager;

public function __construct(
    ......................
    .....................
    \Magento\Store\Model\StoreManagerInterface $storeManager,
    ....................
    ....................
) {
    .....................
    ....................
    $this->_storeManager = $storeManager;
    ....................
    ...................
}   
public function execute()
{
    // get Currrent  store id
    $store = $this->_storeManager->getStore()->getId();

    // get Current Store Name
    $stores_list = $this->_storeManager->getStores(true, true);
    foreach ($stores_list as $storekey => $storevalue) {
        if ($store == $storevalue->getId()) {
            $store_name = $storevalue->getName();
        }
    }
    echo "Store Name".$store_name;
}

you can also get all Details of Store

I Hope This Helps You.

protected $_storeManager;

public function __construct(
    ......................
    .....................
    \Magento\Store\Model\StoreManagerInterface $storeManager,
    ....................
    ....................
) {
    .....................
    ....................
    $this->_storeManager = $storeManager;
    ....................
    ...................
}   
public function execute()
{
    // get Currrent  store id
    $store = $this->_storeManager->getStore()->getId();

    // get Current Store Name
    $stores_list = $this->_storeManager->getStores(true, true);
    foreach ($stores_list as $storekey => $storevalue) {
        if ($store == $storevalue->getId()) {
            $store_name = $storevalue->getName();
        }
    }
    echo "Store Name".$store_name;
}

you can also get all Details of Store

I Hope This Helps You.

protected $_storeManager;

public function __construct(
    ......................
    \Magento\Store\Model\StoreManagerInterface $storeManager,
    ....................
) {
    ....................
    $this->_storeManager = $storeManager;
    ...................
}   
public function execute()
{
    // get Currrent  store id
    $store = $this->_storeManager->getStore()->getId();

    // get Current Store Name
    $stores_list = $this->_storeManager->getStores(true, true);
    foreach ($stores_list as $storekey => $storevalue) {
        if ($store == $storevalue->getId()) {
            $store_name = $storevalue->getName();
        }
    }
    echo "Store Name".$store_name;
}

you can also get all Details of Store

I Hope This Helps You.

deleted 16 characters in body
Source Link
Msquare
  • 9.3k
  • 7
  • 27
  • 68
protected $_storeManager;

public function __construct(
    ......................
    .....................
    \Magento\Store\Model\StoreManagerInterface $storeManager,
    ....................
    ....................
) {
    .....................
    ....................
    $this->_storeManager = $storeManager;
    ....................
    ...................
}   
public function execute()
{
    // get Currrent  store id
    $store = $this->_storeManager->getStore()->getId();

    // get Current Store Name
    $stores_list = $this->_storeManager->getStores(true, true);
    foreach ($stores_list as $storekey => $storevalue) {
        if ($data->getStoreviews()$store == $storevalue->getId()) {
            $store_name = $storevalue->getName();
        }
    }
    echo "Store Name".$store_name;
}

you can also get all Details of Store

I Hope This Helps You.

protected $_storeManager;

public function __construct(
    ......................
    .....................
    \Magento\Store\Model\StoreManagerInterface $storeManager,
    ....................
    ....................
) {
    .....................
    ....................
    $this->_storeManager = $storeManager;
    ....................
    ...................
}   
public function execute()
{
    // get Currrent  store id
    $store = $this->_storeManager->getStore()->getId();

    // get Current Store Name
    $stores_list = $this->_storeManager->getStores(true, true);
    foreach ($stores_list as $storekey => $storevalue) {
        if ($data->getStoreviews() == $storevalue->getId()) {
            $store_name = $storevalue->getName();
        }
    }
    echo "Store Name".$store_name;
}

you can also get all Details of Store

I Hope This Helps You.

protected $_storeManager;

public function __construct(
    ......................
    .....................
    \Magento\Store\Model\StoreManagerInterface $storeManager,
    ....................
    ....................
) {
    .....................
    ....................
    $this->_storeManager = $storeManager;
    ....................
    ...................
}   
public function execute()
{
    // get Currrent  store id
    $store = $this->_storeManager->getStore()->getId();

    // get Current Store Name
    $stores_list = $this->_storeManager->getStores(true, true);
    foreach ($stores_list as $storekey => $storevalue) {
        if ($store == $storevalue->getId()) {
            $store_name = $storevalue->getName();
        }
    }
    echo "Store Name".$store_name;
}

you can also get all Details of Store

I Hope This Helps You.

Source Link
Msquare
  • 9.3k
  • 7
  • 27
  • 68
Loading