cancel
Showing results for 
Search instead for 
Did you mean: 

Add Countries to country_of_manufacture list

Add Countries to country_of_manufacture list

I need to add/edit some countries to this list but cannot find any way to do it. googling only return post form 2016 or earlier saying its impossible. 

5 REPLIES 5

Re: Add Countries to country_of_manufacture list

Hi @steph_nugent,

 

Which version of Magento are you using and which countries are not present into that list?

Re: Add Countries to country_of_manufacture list

There is a public function getAllOptions() which returns the array of all countries.

You can add your logic in this function.

 

If you are using Magento 2, you can get this function from the following path.

vendor/magento/module-catalog/Model/Product/Attribute/Source/Countryofmanufacture.php

 

If you are using Magento 1, you can get this function from the following path.

app/code/core/Mage/Catalog/Model/Product/Attribute/Source/Countryofmanufacture.php

 

Note: Don't add your logic in the core files. Override this function in your custom module and then add your logic there.

 

 

If you find my answer useful, Please click Kudos & Accept as Solution.

Re: Add Countries to country_of_manufacture list

What logic? Nothing in that function looks like a place where i can change "Hong Kong SAR China" to "Hong Kong". the country of manufacture attribute does not have the "add option" button and i cannot click anything it's all grayed out.
Ex1 is the color attribute with a working add option and i can use all fields
Ex2 is the country_of_manufacture attribute where i cannot change anything. I am an admin

mag2.pngmag1.png

Re: Add Countries to country_of_manufacture list

Magento ver. 2.2.3, i need to add US \ China, US\ Honduras, edit Hong Kong 

Re: Add Countries to country_of_manufacture list

Hi 

Were you able to figure this out? @steph_nugent