How to enable/disable the field "State / province / country" in Magento?
How to enable/disable the field State / province / country
in
magento/index.php/customer/address/edit/
page?
My client wants to show the state/province
option in his site.In开发者_高级运维 his existing code only the label state/province
is showing but the input field is not showing.
Can anyone plz help to solve the issue?
This is an old question and OP ended up having a broken template, but hopefully this answer will help others coming from Google.
Since (I think) 1.7, there is a setting in the admin area to do this.
System > Configuration > General > General > States Options
"Display not required State " = No
As I am new to Magento, it was difficult for me to find out the error in the existing code. I solved the error in the following way.
Actually the template was overridden and I corrected the code in:
app\design\frontend\default\my_application_layout\template\customer\address\edit.phtml
And now the problem has been solved.
The answer to the question [How to enable/disable the field State / province / country
”in magento/index.php/customer/address/edit/
page?] is we can do it by overriding the corresponding layout.
Suppose the our layout name is my_default
, then:
Login as admin. Click System->configuration->Design->Themes. Now enter the value of Templates, Skin (Images / CSS),Layout,Default as
my_default
.Create your overridden files inside
app\design\frontend\default\my_default
and insideskin\frontend\default\my_default
You should now see the changes that you need.
精彩评论