2017-04-05 5 views
0

は、私が知りたい、名前すべての店舗でmagento2.xの国名を変更、追加、削除する方法は? magento2.xにコードの下に使用

<?php 
namespace Readymate\Samplemodule\Block; 

class HelloWorld extends \Magento\Framework\View\Element\Template 
{ 
     protected $_countryCollectionFactory; 
     public function __construct(
      \Magento\Directory\Model\ResourceModel\Country\CollectionFactory $countryCollectionFactory, 
      \Magento\Framework\View\Element\Template\Context $context, 
      array $data = [] 
     ) { 
      parent::__construct($context, $data); 
      $this->_countryCollectionFactory = $countryCollectionFactory; 
     } 

     public function getCountryCollection() 
     { 
      $collection = $this->_countryCollectionFactory->create()->loadByStore(); 
      return $collection; 
     } 

     public function getCountries() 
     { 
      return $options = $this->getCountryCollection() 
         ->toOptionArray(); 
     } 
} 

と国のリストを見つけることができますが、どこロケール英語(米国」のmagento2.x店のすべての国の名前 ) "? 「マカオSAR中国」などの国名を「マカオ」に変更して、一部の国をリストから削除したいと考えています。

答えて

0

ここでは、国、州を削除して国名や国名を変更できる国をすべての表に示します。

directory_country

directory_country_region

directory_country_region_name

directory_currency_rate

関連する問題