开发者

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:

  1. Login as admin. Click System->configuration->Design->Themes. Now enter the value of Templates, Skin (Images / CSS),Layout,Default as my_default.

  2. Create your overridden files inside app\design\frontend\default\my_default and inside skin\frontend\default\my_default

You should now see the changes that you need.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜