Jacek Es Posted August 14, 2023 Share Posted August 14, 2023 Hello PrestaShop version: 8.0.4 I am using STATE field for United Kingdom country. I have set this in the country information (Contains states? Yes). In the admin, this field is visible when editing addresses but it's not visible when editing the address in the front end by the customer. When changing country to USA the State field shows up but it doesn't show for the United Kingdom. Any idea how to resolve this? Jacek Link to comment Share on other sites More sharing options...
AddWeb Solution Posted August 15, 2023 Share Posted August 15, 2023 Hi, Check that your current theme is fully compatible with PrestaShop 8.0.4 and supports the display of state fields for the United Kingdom. Try clearing the PrestaShop cache to see if the State field starts appearing as expected. Inspect Template files, Look for any conditionals or checks that might be hiding the State field specifically for the United Kingdom. If you find such code, you might need to modify it to ensure the State field is displayed. Thanks! Link to comment Share on other sites More sharing options...
Jacek Es Posted August 16, 2023 Author Share Posted August 16, 2023 Hi, Thanks for the hints. I tested this on the brand new installation of PrestaShop 8.0.4 with the default theme to exclude custom theme issues. The same results. In the front end (address edit by the customer) the State field only shows for the countries that have States added by default - United States, Mexico, Canada, Argentina, Italy, Indonesia, Japan, Australia, India. For any other country if you add States to them and mark this option in the Country info (Contains states? Yes) the field State only shows in the backend address edit but not in the front end edited by the customer. Interesting part is that if you disable States option for one of Countries that have States added by default (Contains states? No), for example United States then the field State still shows in the front end but does not contain any options to select. This makes me think that Prestashop can only display State field for the countries that have States added by default. You cannot add this option ton other country. Is this a bug? Could be something to do with conditionals reducing this functionality to United States, Mexico, Canada, Argentina, Italy, Indonesia, Japan, Australia, India. Steps to reproduce: 1. Install PS 8.0.4 with the default theme 2. Edit country info for United Kingdom and mark as containing States - (Contains states? Yes) 3. Create sample States for United Kingdom 4. Via the front end create a customer account and add address - the field State is not visible 5. Try add a customer address via the back office - the field State is visible and contains created states (from step 3) I cleared cache after each change and the same results. Jacek Link to comment Share on other sites More sharing options...
AddWeb Solution Posted August 16, 2023 Share Posted August 16, 2023 Hi, Based on your detailed explanation, it appears that there might indeed be a limitation or a bug in how the State field is handled for countries other than the default ones. Reach out to PrestaShop's official support team to report the issue you've encountered. They might be able to confirm whether this behavior is indeed a bug or a limitation, and they may be able to provide a workaround or solution. Thanks! Link to comment Share on other sites More sharing options...
Jacek Es Posted August 16, 2023 Author Share Posted August 16, 2023 Thanks, again. I have submitted this to PrestaShop's official support team . I will update this here once available. Link to comment Share on other sites More sharing options...
AddWeb Solution Posted August 16, 2023 Share Posted August 16, 2023 On 8/16/2023 at 1:33 PM, Jacek Es said: Thanks, again. I have submitted this to PrestaShop's official support team . I will update this here once available. Expand Cool, Thanks! Link to comment Share on other sites More sharing options...
Jacek Es Posted August 17, 2023 Author Share Posted August 17, 2023 It turns out that the State field can be added in the Address format under the Country settings. Everything works as expected Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now